Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
b24ae1cbc6
commit
0ba3a054d2
|
@ -197,6 +197,7 @@ export const discardFileChanges = ({ dispatch, state, commit, getters }, path) =
|
|||
if (file.tempFile) {
|
||||
dispatch('deleteEntry', file.path);
|
||||
} else {
|
||||
commit(types.DISCARD_FILE_CHANGES, file.path);
|
||||
dispatch('renameEntry', {
|
||||
path: file.path,
|
||||
name: file.prevName,
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
[types.DISCARD_FILE_CHANGES](state, path) {
|
||||
const stagedFile = state.stagedFiles.find(f => f.path === path);
|
||||
const entry = state.entries[path];
|
||||
const { deleted, prevPath } = entry;
|
||||
const { deleted } = entry;
|
||||
|
||||
Object.assign(state.entries[path], {
|
||||
content: stagedFile ? stagedFile.content : state.entries[path].raw,
|
||||
|
@ -146,12 +146,6 @@ export default {
|
|||
: state.trees[`${state.currentProjectId}/${state.currentBranchId}`];
|
||||
|
||||
parent.tree = sortTree(parent.tree.concat(entry));
|
||||
} else if (prevPath) {
|
||||
const parent = entry.parentPath
|
||||
? state.entries[entry.parentPath]
|
||||
: state.trees[`${state.currentProjectId}/${state.currentBranchId}`];
|
||||
|
||||
parent.tree = parent.tree.filter(f => f.path !== path);
|
||||
}
|
||||
},
|
||||
[types.ADD_FILE_TO_CHANGED](state, path) {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Update IDE discard of renamed entry to also discard file changes
|
||||
merge_request: 22573
|
||||
author:
|
||||
type: fixed
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Bump cluster-applications image to v0.4.0, adding support to install cert-manager
|
||||
merge_request: 22657
|
||||
author:
|
||||
type: changed
|
|
@ -86,7 +86,7 @@ future GitLab releases.**
|
|||
| `CI_PAGES_URL` | 11.8 | all | URL to GitLab Pages-built pages. Always belongs to a subdomain of `CI_PAGES_DOMAIN`. |
|
||||
| `CI_PIPELINE_ID` | 8.10 | all | The unique id of the current pipeline that GitLab CI uses internally |
|
||||
| `CI_PIPELINE_IID` | 11.0 | all | The unique id of the current pipeline scoped to project |
|
||||
| `CI_PIPELINE_SOURCE` | 10.0 | all | Indicates how the pipeline was triggered. Possible options are: `push`, `web`, `trigger`, `schedule`, `api`, `pipeline` and `merge_request_event`. For pipelines created before GitLab 9.5, this will show as `unknown` |
|
||||
| `CI_PIPELINE_SOURCE` | 10.0 | all | Indicates how the pipeline was triggered. Possible options are: `push`, `web`, `trigger`, `schedule`, `api`, `pipeline`, `external`, `chat`, `merge_request_event`, and `external_pull_request_event`. For pipelines created before GitLab 9.5, this will show as `unknown` |
|
||||
| `CI_PIPELINE_TRIGGERED` | all | all | The flag to indicate that job was [triggered](../triggers/README.md) |
|
||||
| `CI_PIPELINE_URL` | 11.1 | 0.5 | Pipeline details URL |
|
||||
| `CI_PROJECT_DIR` | all | all | The full path where the repository is cloned and where the job is run. If the GitLab Runner `builds_dir` parameter is set, this variable is set relative to the value of `builds_dir`. For more information, see [Advanced configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section) for GitLab Runner. |
|
||||
|
|
|
@ -729,7 +729,18 @@ Learn more about [variables expressions](../variables/README.md#environment-vari
|
|||
Using the `changes` keyword with `only` or `except` makes it possible to define if
|
||||
a job should be created based on files modified by a Git push event.
|
||||
|
||||
For example:
|
||||
This means the `only:changes` policy is useful for pipelines where:
|
||||
|
||||
- `$CI_PIPELINE_SOURCE == 'push'`
|
||||
- `$CI_PIPELINE_SOURCE == 'merge_request_event'`
|
||||
- `$CI_PIPELINE_SOURCE == 'external_pull_request_event'`
|
||||
|
||||
If there is no Git push event, such as for pipelines with
|
||||
[sources other than the three above](../variables/predefined_variables.html#variables-reference),
|
||||
`changes` cannot determine if a given file is new or old, and will always
|
||||
return true.
|
||||
|
||||
A basic example of using `only: changes`:
|
||||
|
||||
```yaml
|
||||
docker build:
|
||||
|
@ -910,8 +921,9 @@ at all, the behavior defaults to `job:when`, which continues to default to
|
|||
|
||||
#### `rules:changes`
|
||||
|
||||
`changes` works exactly the same way as [`only`/`except`](#onlychangesexceptchanges),
|
||||
accepting an array of paths.
|
||||
`rules: changes` works exactly the same way as `only: changes` and `except: changes`,
|
||||
accepting an array of paths. Similarly, it will always return true if there is no
|
||||
Git push event. See [`only/except: changes`](#onlychangesexceptchanges) for more information.
|
||||
|
||||
For example:
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ The following applications can be installed:
|
|||
|
||||
- [Helm](#helm)
|
||||
- [Ingress](#ingress)
|
||||
- [Cert-Manager](#cert-manager)
|
||||
- [cert-manager](#cert-manager)
|
||||
- [Prometheus](#prometheus)
|
||||
- [GitLab Runner](#gitlab-runner)
|
||||
- [JupyterHub](#jupyterhub)
|
||||
|
@ -73,13 +73,13 @@ Installing Helm as a GitLab-managed App behind a proxy is not supported,
|
|||
but a [workaround](../../topics/autodevops/index.md#installing-helm-behind-a-proxy)
|
||||
is available.
|
||||
|
||||
### Cert-Manager
|
||||
### cert-manager
|
||||
|
||||
> Introduced in GitLab 11.6 for project- and group-level clusters.
|
||||
|
||||
[Cert-Manager](https://docs.cert-manager.io/en/latest/) is a native
|
||||
[cert-manager](https://docs.cert-manager.io/en/latest/) is a native
|
||||
Kubernetes certificate management controller that helps with issuing
|
||||
certificates. Installing Cert-Manager on your cluster will issue a
|
||||
certificates. Installing cert-manager on your cluster will issue a
|
||||
certificate by [Let's Encrypt](https://letsencrypt.org/) and ensure that
|
||||
certificates are valid and up-to-date.
|
||||
|
||||
|
@ -91,13 +91,13 @@ The chart used to install this application depends on the version of GitLab used
|
|||
- GitLab 12.2 and older, the [stable/cert-manager](https://github.com/helm/charts/tree/master/stable/cert-manager)
|
||||
chart was used.
|
||||
|
||||
If you have installed Cert-Manager prior to GitLab 12.3, Let's Encrypt will
|
||||
[block requests from older versions of Cert-Manager](https://community.letsencrypt.org/t/blocking-old-cert-manager-versions/98753).
|
||||
If you have installed cert-manager prior to GitLab 12.3, Let's Encrypt will
|
||||
[block requests from older versions of cert-manager](https://community.letsencrypt.org/t/blocking-old-cert-manager-versions/98753).
|
||||
|
||||
To resolve this:
|
||||
|
||||
1. Uninstall Cert-Manager (consider [backing up any additional configuration](https://docs.cert-manager.io/en/latest/tasks/backup-restore-crds.html)).
|
||||
1. Install Cert-Manager again.
|
||||
1. Uninstall cert-manager (consider [backing up any additional configuration](https://docs.cert-manager.io/en/latest/tasks/backup-restore-crds.html)).
|
||||
1. Install cert-manager again.
|
||||
|
||||
### GitLab Runner
|
||||
|
||||
|
@ -446,6 +446,7 @@ install using Helm `values.yaml` files.
|
|||
Supported applications:
|
||||
|
||||
- [Ingress](#install-ingress-using-gitlab-ci)
|
||||
- [cert-manager](#install-cert-manager-using-gitlab-ci)
|
||||
- [Sentry](#install-sentry-using-gitlab-ci)
|
||||
|
||||
### Usage
|
||||
|
@ -499,6 +500,43 @@ management project. Refer to the
|
|||
[chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
|
||||
for the available configuration options.
|
||||
|
||||
### Install cert-manager using GitLab CI
|
||||
|
||||
cert-manager is installed using GitLab CI by defining configuration in
|
||||
`.gitlab/managed-apps/config.yaml`.
|
||||
|
||||
cert-manager:
|
||||
|
||||
- Is installed into the `gitlab-managed-apps` namespace of your cluster.
|
||||
- Can be installed with or without a default [Let's Encrypt `ClusterIssuer`](https://cert-manager.io/docs/configuration/acme/), which requires an
|
||||
email address to be specified. The email address is used by Let's Encrypt to
|
||||
contact you about expiring certificates and issues related to your account.
|
||||
|
||||
The following configuration is required to install cert-manager using GitLab CI:
|
||||
|
||||
```yaml
|
||||
certManager:
|
||||
installed: true
|
||||
letsEncryptClusterIssuer:
|
||||
installed: true
|
||||
email: "user@example.com"
|
||||
```
|
||||
|
||||
The following installs cert-manager using GitLab CI without the default `ClusterIssuer`:
|
||||
|
||||
```yaml
|
||||
certManager:
|
||||
installed: true
|
||||
letsEncryptClusterIssuer:
|
||||
installed: false
|
||||
```
|
||||
|
||||
You can customize the installation of Ingress by defining
|
||||
`.gitlab/managed-apps/cert-manager/values.yaml` file in your cluster
|
||||
management project. Refer to the
|
||||
[chart](https://hub.helm.sh/charts/jetstack/cert-manager) for the
|
||||
available configuration options.
|
||||
|
||||
### Install Sentry using GitLab CI
|
||||
|
||||
NOTE: **Note:**
|
||||
|
@ -593,7 +631,7 @@ The applications below can be uninstalled.
|
|||
|
||||
| Application | GitLab version | Notes |
|
||||
| ----------- | -------------- | ----- |
|
||||
| Cert-Manager | 12.2+ | The associated private key will be deleted and cannot be restored. Deployed applications will continue to use HTTPS, but certificates will not be renewed. Before uninstalling, you may wish to [back up your configuration](https://docs.cert-manager.io/en/latest/tasks/backup-restore-crds.html) or [revoke your certificates](https://letsencrypt.org/docs/revoking/). |
|
||||
| cert-manager | 12.2+ | The associated private key will be deleted and cannot be restored. Deployed applications will continue to use HTTPS, but certificates will not be renewed. Before uninstalling, you may wish to [back up your configuration](https://docs.cert-manager.io/en/latest/tasks/backup-restore-crds.html) or [revoke your certificates](https://letsencrypt.org/docs/revoking/). |
|
||||
| GitLab Runner | 12.2+ | Any running pipelines will be canceled. |
|
||||
| Helm | 12.2+ | The associated Tiller pod, the `gitlab-managed-apps` namespace, and all of its resources will be deleted and cannot be restored. |
|
||||
| Ingress | 12.1+ | The associated load balancer and IP will be deleted and cannot be restored. Furthermore, it can only be uninstalled if JupyterHub is not installed. |
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
apply:
|
||||
stage: deploy
|
||||
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.3.0"
|
||||
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.4.0"
|
||||
environment:
|
||||
name: production
|
||||
variables:
|
||||
|
@ -9,7 +9,6 @@ apply:
|
|||
INGRESS_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/ingress/values.yaml
|
||||
SENTRY_VALUES_FILE: $CI_PROJECT_DIR/.gitlab/managed-apps/sentry/values.yaml
|
||||
script:
|
||||
- kubectl get namespace "$TILLER_NAMESPACE" || kubectl create namespace "$TILLER_NAMESPACE"
|
||||
- gitlab-managed-apps /usr/local/share/gitlab-managed-apps/helmfile.yaml
|
||||
only:
|
||||
refs:
|
||||
|
|
|
@ -21,7 +21,6 @@ describe('Admin statistics app', () => {
|
|||
wrapper = shallowMount(StatisticsPanelApp, {
|
||||
localVue,
|
||||
store,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ describe('Issue Time Estimate component', () => {
|
|||
propsData: {
|
||||
estimate: 374460,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -61,7 +60,6 @@ describe('Issue Time Estimate component', () => {
|
|||
propsData: {
|
||||
estimate: 374460,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ describe('Issue card component', () => {
|
|||
rootPath: '/',
|
||||
},
|
||||
store,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,7 +13,6 @@ describe('Remove cluster confirmation modal', () => {
|
|||
clusterName: 'clusterName',
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ describe('Commit pipeline status component', () => {
|
|||
...defaultProps,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ const createComponent = (store, propsData = componentConfig) =>
|
|||
propsData,
|
||||
store,
|
||||
localVue,
|
||||
sync: false,
|
||||
});
|
||||
|
||||
const createStore = (initialState = {}, getters = {}) =>
|
||||
|
|
|
@ -10,7 +10,6 @@ const createComponent = props =>
|
|||
propsData: {
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ describe('CompareVersions', () => {
|
|||
store.state.diffs.diffFiles.push('test');
|
||||
|
||||
wrapper = mount(CompareVersionsComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
localVue,
|
||||
store,
|
||||
|
|
|
@ -84,7 +84,6 @@ describe('DiffContent', () => {
|
|||
},
|
||||
localVue,
|
||||
store: fakeStore,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('DiffDiscussionReply', () => {
|
|||
wrapper = shallowMount(DiffDiscussionReply, {
|
||||
store,
|
||||
localVue,
|
||||
sync: false,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -91,7 +91,6 @@ describe('DiffFileHeader component', () => {
|
|||
},
|
||||
localVue,
|
||||
store,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('DiffGutterAvatars', () => {
|
|||
propsData: {
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -9,7 +9,6 @@ describe('EditButton', () => {
|
|||
const createComponent = (props = {}) => {
|
||||
wrapper = shallowMount(EditButton, {
|
||||
propsData: { ...props },
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@ describe('HiddenFilesWarning', () => {
|
|||
|
||||
const createComponent = () => {
|
||||
wrapper = shallowMount(HiddenFilesWarning, {
|
||||
sync: false,
|
||||
propsData,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -28,7 +28,6 @@ describe('Diff settiings dropdown component', () => {
|
|||
vm = mount(SettingsDropdown, {
|
||||
localVue,
|
||||
store,
|
||||
sync: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ describe('Monitoring Component', () => {
|
|||
|
||||
const createWrapper = () => {
|
||||
wrapper = shallowMount(MonitoringComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: {
|
||||
monitoringUrl,
|
||||
|
|
|
@ -14,7 +14,6 @@ describe('Rollback Component', () => {
|
|||
environment: {},
|
||||
},
|
||||
attachToDocument: true,
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(wrapper.element).toHaveSpriteIcon('repeat');
|
||||
|
@ -28,7 +27,6 @@ describe('Rollback Component', () => {
|
|||
environment: {},
|
||||
},
|
||||
attachToDocument: true,
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(wrapper.element).toHaveSpriteIcon('redo');
|
||||
|
|
|
@ -11,7 +11,6 @@ describe('Stop Component', () => {
|
|||
|
||||
const createWrapper = () => {
|
||||
wrapper = shallowMount(StopComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: {
|
||||
environment: {},
|
||||
|
|
|
@ -7,7 +7,6 @@ describe('Stop Component', () => {
|
|||
|
||||
const mountWithProps = props => {
|
||||
wrapper = shallowMount(TerminalComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: props,
|
||||
});
|
||||
|
|
|
@ -29,7 +29,6 @@ describe('ErrorTrackingList', () => {
|
|||
wrapper = mount(ErrorTrackingList, {
|
||||
localVue,
|
||||
store,
|
||||
sync: false,
|
||||
propsData: {
|
||||
indexPath: '/path',
|
||||
enableErrorTrackingLink: '/link',
|
||||
|
|
|
@ -5,7 +5,6 @@ import eventHub from '~/frequent_items/event_hub';
|
|||
const createComponent = (namespace = 'projects') =>
|
||||
shallowMount(searchComponent, {
|
||||
propsData: { namespace },
|
||||
sync: false,
|
||||
});
|
||||
|
||||
describe('FrequentItemsSearchInputComponent', () => {
|
||||
|
|
|
@ -33,7 +33,6 @@ describe('IDE branches search list', () => {
|
|||
wrapper = shallowMount(List, {
|
||||
localVue,
|
||||
store: fakeStore,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ describe('IDE commit editor header', () => {
|
|||
wrapper = mount(EditorHeader, {
|
||||
store,
|
||||
localVue,
|
||||
sync: false,
|
||||
propsData: {
|
||||
activeFile: f,
|
||||
},
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('IDE error message component', () => {
|
|||
},
|
||||
store: fakeStore,
|
||||
localVue,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ describe('IDE file templates dropdown component', () => {
|
|||
},
|
||||
store: fakeStore,
|
||||
localVue,
|
||||
sync: false,
|
||||
});
|
||||
|
||||
({ element } = wrapper);
|
||||
|
|
|
@ -27,7 +27,6 @@ describe('ide/components/ide_status_list', () => {
|
|||
|
||||
wrapper = shallowMount(IdeStatusList, {
|
||||
localVue,
|
||||
sync: false,
|
||||
store,
|
||||
...options,
|
||||
});
|
||||
|
|
|
@ -44,7 +44,6 @@ describe('IDE stages list', () => {
|
|||
},
|
||||
localVue,
|
||||
store,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -93,7 +92,6 @@ describe('IDE stages list', () => {
|
|||
wrapper = mount(StageList, {
|
||||
propsData: { ...defaultProps, stages },
|
||||
store,
|
||||
sync: false,
|
||||
localVue,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('IDE pipeline stage', () => {
|
|||
...defaultProps,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ describe('IDE merge requests list', () => {
|
|||
wrapper = shallowMount(List, {
|
||||
store: fakeStore,
|
||||
localVue,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@ describe('IDE pipelines list', () => {
|
|||
wrapper = shallowMount(List, {
|
||||
localVue,
|
||||
store: fakeStore,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@ describe('IDE clientside preview', () => {
|
|||
});
|
||||
|
||||
wrapper = shallowMount(Clientside, {
|
||||
sync: false,
|
||||
store,
|
||||
localVue,
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ import router from '~/ide/ide_router';
|
|||
import eventHub from '~/ide/eventhub';
|
||||
import { file } from '../../helpers';
|
||||
|
||||
const ORIGINAL_CONTENT = 'original content';
|
||||
const RELATIVE_URL_ROOT = '/gitlab';
|
||||
|
||||
describe('IDE store file actions', () => {
|
||||
|
@ -583,6 +584,7 @@ describe('IDE store file actions', () => {
|
|||
|
||||
tmpFile = file('tempFile');
|
||||
tmpFile.content = 'testing';
|
||||
tmpFile.raw = ORIGINAL_CONTENT;
|
||||
|
||||
store.state.changedFiles.push(tmpFile);
|
||||
store.state.entries[tmpFile.path] = tmpFile;
|
||||
|
@ -594,7 +596,7 @@ describe('IDE store file actions', () => {
|
|||
store
|
||||
.dispatch('discardFileChanges', tmpFile.path)
|
||||
.then(() => {
|
||||
expect(tmpFile.content).not.toBe('testing');
|
||||
expect(tmpFile.content).toBe(ORIGINAL_CONTENT);
|
||||
|
||||
done();
|
||||
})
|
||||
|
@ -624,22 +626,30 @@ describe('IDE store file actions', () => {
|
|||
expect(store.dispatch).toHaveBeenCalledWith('deleteEntry', tmpFile.path);
|
||||
});
|
||||
|
||||
it('renames the file to its original name and closes it if it was open', () => {
|
||||
Object.assign(tmpFile, {
|
||||
prevPath: 'parentPath/old_name',
|
||||
prevName: 'old_name',
|
||||
prevParentPath: 'parentPath',
|
||||
describe('with renamed file', () => {
|
||||
beforeEach(() => {
|
||||
Object.assign(tmpFile, {
|
||||
prevPath: 'parentPath/old_name',
|
||||
prevName: 'old_name',
|
||||
prevParentPath: 'parentPath',
|
||||
});
|
||||
|
||||
store.state.entries.parentPath = file('parentPath');
|
||||
|
||||
actions.discardFileChanges(store, tmpFile.path);
|
||||
});
|
||||
|
||||
store.state.entries.parentPath = file('parentPath');
|
||||
it('renames the file to its original name and closes it if it was open', () => {
|
||||
expect(store.dispatch).toHaveBeenCalledWith('closeFile', tmpFile);
|
||||
expect(store.dispatch).toHaveBeenCalledWith('renameEntry', {
|
||||
path: 'tempFile',
|
||||
name: 'old_name',
|
||||
parentPath: 'parentPath',
|
||||
});
|
||||
});
|
||||
|
||||
actions.discardFileChanges(store, tmpFile.path);
|
||||
|
||||
expect(store.dispatch).toHaveBeenCalledWith('closeFile', tmpFile);
|
||||
expect(store.dispatch).toHaveBeenCalledWith('renameEntry', {
|
||||
path: 'tempFile',
|
||||
name: 'old_name',
|
||||
parentPath: 'parentPath',
|
||||
it('resets file content', () => {
|
||||
expect(tmpFile.content).toBe(ORIGINAL_CONTENT);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ describe('ImportProjectsTable', () => {
|
|||
propsData: {
|
||||
providerTitle,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return component.vm;
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('ImportedProjectTableRow', () => {
|
|||
...project,
|
||||
},
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return component.vm;
|
||||
|
|
|
@ -45,7 +45,6 @@ describe('ProviderRepoTableRow', () => {
|
|||
propsData: {
|
||||
repo,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return component.vm;
|
||||
|
|
|
@ -11,7 +11,6 @@ describe('Issuable suggestions app component', () => {
|
|||
search,
|
||||
projectPath: 'project',
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('Issuable suggestions suggestion component', () => {
|
|||
...suggestion,
|
||||
},
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ describe('Issuable component', () => {
|
|||
baseUrl: TEST_BASE_URL,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -45,7 +45,6 @@ describe('Issuables list component', () => {
|
|||
emptySvgPath: TEST_EMPTY_SVG_PATH,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -18,7 +18,6 @@ describe('PinnedLinks', () => {
|
|||
|
||||
const createComponent = props => {
|
||||
wrapper = shallowMount(PinnedLinks, {
|
||||
sync: false,
|
||||
propsData: {
|
||||
zoomMeetingUrl: null,
|
||||
...props,
|
||||
|
|
|
@ -13,7 +13,6 @@ describe('Erased block', () => {
|
|||
const createComponent = props => {
|
||||
wrapper = mount(ErasedBlock, {
|
||||
propsData: props,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -12,7 +12,6 @@ describe('Job Log Collapsible Section', () => {
|
|||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = mount(CollpasibleSection, {
|
||||
sync: true,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -10,7 +10,6 @@ describe('Job Log Duration Badge', () => {
|
|||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = shallowMount(DurationBadge, {
|
||||
sync: false,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -22,7 +22,6 @@ describe('Job Log Header Line', () => {
|
|||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = mount(LineHeader, {
|
||||
sync: false,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -11,7 +11,6 @@ describe('Job Log Line Number', () => {
|
|||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = shallowMount(LineNumber, {
|
||||
sync: false,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -20,7 +20,6 @@ describe('Job Log Line', () => {
|
|||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = shallowMount(Line, {
|
||||
sync: false,
|
||||
propsData: {
|
||||
...props,
|
||||
},
|
||||
|
|
|
@ -15,7 +15,6 @@ describe('Job Log', () => {
|
|||
|
||||
const createComponent = () => {
|
||||
wrapper = mount(Log, {
|
||||
sync: false,
|
||||
localVue,
|
||||
store,
|
||||
});
|
||||
|
|
|
@ -38,7 +38,6 @@ describe('Anomaly chart component', () => {
|
|||
slots: {
|
||||
default: mockWidgets,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
const findTimeSeries = () => wrapper.find(MonitorTimeSeriesChart);
|
||||
|
|
|
@ -32,7 +32,6 @@ describe('Column component', () => {
|
|||
},
|
||||
containerWidth: 100,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ describe('Empty Chart component', () => {
|
|||
propsData: {
|
||||
graphTitle,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ describe('Single Stat Chart component', () => {
|
|||
propsData: {
|
||||
graphData: graphDataPrometheusQuery,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ describe('Time series component', () => {
|
|||
slots: {
|
||||
default: mockWidgets,
|
||||
},
|
||||
sync: false,
|
||||
store,
|
||||
attachToDocument: true,
|
||||
});
|
||||
|
|
|
@ -30,7 +30,6 @@ describe('Dashboard', () => {
|
|||
const createShallowWrapper = (props = {}, options = {}) => {
|
||||
wrapper = shallowMount(Dashboard, {
|
||||
localVue,
|
||||
sync: false,
|
||||
propsData: { ...propsData, ...props },
|
||||
store,
|
||||
...options,
|
||||
|
@ -40,7 +39,6 @@ describe('Dashboard', () => {
|
|||
const createMountedWrapper = (props = {}, options = {}) => {
|
||||
wrapper = mount(Dashboard, {
|
||||
localVue,
|
||||
sync: false,
|
||||
propsData: { ...propsData, ...props },
|
||||
store,
|
||||
...options,
|
||||
|
|
|
@ -19,7 +19,6 @@ describe('dashboard invalid url parameters', () => {
|
|||
|
||||
const createMountedWrapper = (props = {}, options = {}) => {
|
||||
wrapper = mount(Dashboard, {
|
||||
sync: false,
|
||||
propsData: { ...propsData, ...props },
|
||||
store,
|
||||
...options,
|
||||
|
|
|
@ -24,7 +24,6 @@ describe('dashboard time window', () => {
|
|||
|
||||
const createComponentWrapperMounted = (props = {}, options = {}) => {
|
||||
wrapper = mount(Dashboard, {
|
||||
sync: false,
|
||||
propsData: { ...propsData, ...props },
|
||||
store,
|
||||
...options,
|
||||
|
|
|
@ -15,7 +15,6 @@ describe('DateTimePickerInput', () => {
|
|||
label: '',
|
||||
...propsData,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ describe('DateTimePicker', () => {
|
|||
end,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ describe('Graph group component', () => {
|
|||
const createComponent = propsData => {
|
||||
wrapper = shallowMount(GraphGroup, {
|
||||
propsData,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ describe('Panel Type component', () => {
|
|||
...props,
|
||||
},
|
||||
store,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
|
||||
|
@ -152,7 +151,6 @@ describe('Panel Type component', () => {
|
|||
graphData: graphDataPrometheusQueryRange,
|
||||
},
|
||||
store,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
panelType.vm.$nextTick(done);
|
||||
|
|
|
@ -37,7 +37,6 @@ describe('issue_comment_form component', () => {
|
|||
noteableType,
|
||||
},
|
||||
store,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -21,7 +21,6 @@ describe('diff_discussion_header component', () => {
|
|||
wrapper = mount(diffDiscussionHeader, {
|
||||
store,
|
||||
propsData: { discussion: discussionMock },
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ describe('DiscussionActions', () => {
|
|||
shouldShowJumpToNextDiscussion: true,
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -6,7 +6,6 @@ describe('JumpToNextDiscussionButton', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
wrapper = shallowMount(JumpToNextDiscussionButton, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('DiscussionNotesRepliesWrapper', () => {
|
|||
const createComponent = (props = {}) => {
|
||||
wrapper = mount(TestComponent, {
|
||||
propsData: props,
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ describe('DiscussionNotes', () => {
|
|||
slots: {
|
||||
'avatar-badge': '<span class="avatar-badge-slot-content" />',
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -62,7 +62,6 @@ describe('note_app', () => {
|
|||
attachToDocument: true,
|
||||
propsData,
|
||||
store,
|
||||
sync: false,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
|
|
@ -21,7 +21,6 @@ describe('NoteEditedText', () => {
|
|||
beforeEach(() => {
|
||||
wrapper = shallowMount(NoteEditedText, {
|
||||
propsData,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -48,7 +48,6 @@ describe('User Operation confirmation modal', () => {
|
|||
stubs: {
|
||||
GlModal: ModalStub,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ describe('Users admin page Modal Manager', () => {
|
|||
csrfToken: 'dummyCSRF',
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ describe('User Operation confirmation modal', () => {
|
|||
method: 'method',
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ describe('pipeline graph action component', () => {
|
|||
link: 'foo',
|
||||
actionIcon: 'cancel',
|
||||
},
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,7 +6,10 @@ describe('pipeline graph job item', () => {
|
|||
let wrapper;
|
||||
|
||||
const createWrapper = propsData => {
|
||||
wrapper = mount(JobItem, { sync: false, attachToDocument: true, propsData });
|
||||
wrapper = mount(JobItem, {
|
||||
attachToDocument: true,
|
||||
propsData,
|
||||
});
|
||||
};
|
||||
|
||||
const delayedJobFixture = getJSONFixture('jobs/delayed.json');
|
||||
|
|
|
@ -19,7 +19,6 @@ describe('Linked pipeline', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(LinkedPipelineComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: props,
|
||||
});
|
||||
|
@ -83,7 +82,6 @@ describe('Linked pipeline', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(LinkedPipelineComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: props,
|
||||
});
|
||||
|
@ -101,7 +99,6 @@ describe('Linked pipeline', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(LinkedPipelineComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: props,
|
||||
});
|
||||
|
|
|
@ -24,7 +24,6 @@ describe('Pipelines Triggerer', () => {
|
|||
const createComponent = () => {
|
||||
wrapper = shallowMount(pipelineTriggerer, {
|
||||
propsData: mockData,
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -10,7 +10,6 @@ describe('Pipeline Url Component', () => {
|
|||
|
||||
const createComponent = props => {
|
||||
wrapper = shallowMount(PipelineUrlComponent, {
|
||||
sync: false,
|
||||
attachToDocument: true,
|
||||
propsData: props,
|
||||
});
|
||||
|
|
|
@ -12,7 +12,6 @@ describe('Pipelines Table Row', () => {
|
|||
autoDevopsHelpPath: 'foo',
|
||||
viewType: 'root',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
let wrapper;
|
||||
|
|
|
@ -62,7 +62,6 @@ describe('Registry List', () => {
|
|||
beforeEach(() => {
|
||||
wrapper = mount(registry, {
|
||||
attachToDocument: true,
|
||||
sync: false,
|
||||
propsData,
|
||||
computed: {
|
||||
repos() {
|
||||
|
|
|
@ -7,7 +7,6 @@ describe('Registry Project Empty state', () => {
|
|||
beforeEach(() => {
|
||||
wrapper = mount(projectEmptyState, {
|
||||
attachToDocument: true,
|
||||
sync: false,
|
||||
propsData: {
|
||||
noContainersImage: 'imageUrl',
|
||||
helpPagePath: 'help',
|
||||
|
|
|
@ -17,7 +17,6 @@ describe('Registry Settings App', () => {
|
|||
const mountComponent = (options = {}) => {
|
||||
fetchSpy = jest.fn();
|
||||
wrapper = shallowMount(component, {
|
||||
sync: false,
|
||||
store,
|
||||
methods: {
|
||||
fetchSettings: fetchSpy,
|
||||
|
|
|
@ -24,7 +24,6 @@ describe('Settings Form', () => {
|
|||
saveSpy = jest.fn();
|
||||
resetSpy = jest.fn();
|
||||
wrapper = shallowMount(component, {
|
||||
sync: false,
|
||||
store,
|
||||
methods: {
|
||||
saveSettings: saveSpy,
|
||||
|
|
|
@ -29,7 +29,10 @@ describe('Release detail component', () => {
|
|||
|
||||
const store = new Vuex.Store({ actions, state });
|
||||
|
||||
wrapper = mount(ReleaseDetailApp, { store, sync: false, attachToDocument: true });
|
||||
wrapper = mount(ReleaseDetailApp, {
|
||||
store,
|
||||
attachToDocument: true,
|
||||
});
|
||||
|
||||
return wrapper.vm.$nextTick();
|
||||
});
|
||||
|
|
|
@ -27,7 +27,6 @@ describe('Release block footer', () => {
|
|||
...convertObjectPropsToCamelCase(releaseClone),
|
||||
...props,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return wrapper.vm.$nextTick();
|
||||
|
|
|
@ -14,7 +14,6 @@ describe('Release block milestone info', () => {
|
|||
propsData: {
|
||||
milestones: milestonesProp,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return wrapper.vm.$nextTick();
|
||||
|
|
|
@ -34,7 +34,6 @@ describe('Release block', () => {
|
|||
...featureFlags,
|
||||
},
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
return wrapper.vm.$nextTick();
|
||||
|
|
|
@ -16,7 +16,6 @@ describe('Area component', () => {
|
|||
slots: {
|
||||
default: mockWidgets,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@ import { mockServerlessFunctions, mockServerlessFunctionsDiffEnv } from '../mock
|
|||
import { translate } from '~/serverless/utils';
|
||||
|
||||
const createComponent = (env, envName) =>
|
||||
shallowMount(environmentRowComponent, { propsData: { env, envName }, sync: false }).vm;
|
||||
shallowMount(environmentRowComponent, {
|
||||
propsData: { env, envName },
|
||||
}).vm;
|
||||
|
||||
describe('environment row component', () => {
|
||||
describe('default global cluster case', () => {
|
||||
|
|
|
@ -41,7 +41,6 @@ describe('functionDetailsComponent', () => {
|
|||
clustersPath: '/clusters',
|
||||
helpPath: '/help',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(
|
||||
|
@ -69,7 +68,6 @@ describe('functionDetailsComponent', () => {
|
|||
clustersPath: '/clusters',
|
||||
helpPath: '/help',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(component.vm.$el.querySelector('p').innerHTML.trim()).toContain('1 pod in use');
|
||||
|
@ -87,7 +85,6 @@ describe('functionDetailsComponent', () => {
|
|||
clustersPath: '/clusters',
|
||||
helpPath: '/help',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(component.vm.$el.querySelector('p').innerHTML.trim()).toContain('3 pods in use');
|
||||
|
@ -105,7 +102,6 @@ describe('functionDetailsComponent', () => {
|
|||
clustersPath: '/clusters',
|
||||
helpPath: '/help',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(
|
||||
|
|
|
@ -8,7 +8,9 @@ describe('functionRowComponent', () => {
|
|||
let wrapper;
|
||||
|
||||
const createComponent = func => {
|
||||
wrapper = shallowMount(functionRowComponent, { propsData: { func }, sync: false });
|
||||
wrapper = shallowMount(functionRowComponent, {
|
||||
propsData: { func },
|
||||
});
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
@ -43,7 +43,6 @@ describe('functionsComponent', () => {
|
|||
helpPath: '',
|
||||
statusPath: '',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(component.find(EmptyState).exists()).toBe(true);
|
||||
|
@ -59,7 +58,6 @@ describe('functionsComponent', () => {
|
|||
helpPath: '',
|
||||
statusPath: '',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(component.find(GlLoadingIcon).exists()).toBe(true);
|
||||
|
@ -75,7 +73,6 @@ describe('functionsComponent', () => {
|
|||
helpPath: '',
|
||||
statusPath: '',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(
|
||||
|
@ -102,7 +99,6 @@ describe('functionsComponent', () => {
|
|||
helpPath: '',
|
||||
statusPath: '',
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
expect(component.find('.js-functions-wrapper').exists()).toBe(true);
|
||||
|
@ -118,7 +114,6 @@ describe('functionsComponent', () => {
|
|||
helpPath: 'helpPath',
|
||||
statusPath,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
component.vm.$store.dispatch('receiveFunctionsSuccess', mockServerlessFunctions);
|
||||
|
|
|
@ -9,7 +9,6 @@ const createComponent = missingData =>
|
|||
helpPath: '/help',
|
||||
missingData,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
describe('missingPrometheusComponent', () => {
|
||||
|
|
|
@ -6,7 +6,6 @@ const createComponent = count =>
|
|||
propsData: {
|
||||
count,
|
||||
},
|
||||
sync: false,
|
||||
}).vm;
|
||||
|
||||
describe('podBoxComponent', () => {
|
||||
|
|
|
@ -8,7 +8,6 @@ const createComponent = uri =>
|
|||
propsData: {
|
||||
uri,
|
||||
},
|
||||
sync: false,
|
||||
});
|
||||
|
||||
describe('urlComponent', () => {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue