foreman_ansible 6.1.1 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/foreman_ansible/ansible_reports_helper.rb +1 -4
  3. data/app/services/foreman_ansible/operating_system_parser.rb +1 -1
  4. data/app/services/foreman_ansible/variables_importer.rb +6 -1
  5. data/app/views/foreman_ansible/ansible_roles/_select_tab_content.html.erb +8 -16
  6. data/app/views/foreman_ansible/job_templates/ansible_roles_-_install_from_galaxy.erb +1 -1
  7. data/lib/foreman_ansible/version.rb +1 -1
  8. data/package.json +11 -42
  9. data/test/unit/services/ansible_variables_importer_test.rb +13 -0
  10. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcher.js +11 -9
  11. data/webpack/components/AnsibleRolesSwitcher/AnsibleRolesSwitcherActions.js +14 -14
  12. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcher.test.js +4 -4
  13. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherReducer.test.js +1 -1
  14. data/webpack/components/AnsibleRolesSwitcher/__tests__/AnsibleRolesSwitcherSelectors.test.js +1 -1
  15. data/webpack/components/AnsibleRolesSwitcher/__tests__/__snapshots__/AnsibleRolesSwitcher.test.js.snap +1 -0
  16. data/webpack/components/AnsibleRolesSwitcher/components/AnsiblePermissionDenied.test.js +1 -1
  17. data/webpack/components/AnsibleRolesSwitcher/components/AnsibleRole.test.js +1 -1
  18. data/webpack/components/AnsibleRolesSwitcher/components/AssignedRolesList.test.js +1 -1
  19. data/webpack/components/AnsibleRolesSwitcher/components/AvailableRolesList.test.js +1 -1
  20. data/webpack/components/AnsibleRolesSwitcher/index.js +1 -1
  21. data/webpack/index.js +0 -13
  22. metadata +12 -13
  23. data/webpack/test_setup.js +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '059c70bd67d597c230eea6135f738afd7c203c27cb1e1d1a7d5b3b88bada984f'
4
- data.tar.gz: 2509eb475c69a745d46f726700a5308ee128823f90aaa8e852067b941797141e
3
+ metadata.gz: d95899e15050cbf3f25d75a8f3c9bc5a3059a9dd0ffa90f4690ce84cf49d3408
4
+ data.tar.gz: 466754ac90d1e80046fca70ca8db372e90d2b61a0d26a726f0807f7e81227728
5
5
  SHA512:
6
- metadata.gz: 212613afe4068af042fcb9340bddab879afd4c0b7ced2a6748861561cd76ed185609d2582fed69b03af76f7753b83cb5a18923f2d2170480a1deb3e17fb34338
7
- data.tar.gz: 4134c4f15af8a5567ddc319978f5c1538e982bc83923d9ba8a1c45a524fb0d7628f236079d6355c9ab5f5d5ca931a85f1bd1c52673efb2ae2e7f2ed8a21d4b9d
6
+ metadata.gz: 9f79b560e9e01e8719c6e705ff5fef6a9f9e7b91bc9ec1b9b79c81750b572c4de6929d2ab07049caefdf4f555a5087c31eb76543d52b87622038107a1e02ea63
7
+ data.tar.gz: 357b61ffdb94b61a37ecf87afba07f7e0c2158d4af14d39b701fb31152803692a8feaac09294bb2bc8c0ae8fe8d9daa66eb8eb6f0869c4901315dca688f06dab
@@ -42,10 +42,7 @@ module ForemanAnsible
42
42
  end
43
43
 
44
44
  def report_json_viewer(json)
45
- uid = "reportjson-viewer-#{json.object_id}"
46
- viewer = content_tag :div, '', :id => uid
47
- viewer << mount_react_component('ReportJsonViewer',
48
- "##{uid}", json.to_json)
45
+ react_component('ReportJsonViewer', data: json)
49
46
  end
50
47
 
51
48
  private
@@ -80,7 +80,7 @@ module ForemanAnsible
80
80
  facts[:ansible_os_name].tr(" \n\t", '') ||
81
81
  facts[:ansible_distribution].tr(" \n\t", '')
82
82
  else
83
- distribution = facts[:ansible_distribution] || facts[:ansible_lsb].try(:[], 'id')
83
+ distribution = facts[:ansible_lsb].try(:[], 'id') || facts[:ansible_distribution]
84
84
 
85
85
  if distribution == 'RedHat' &&
86
86
  facts[:ansible_lsb].try(:[], 'id') == 'RedHatEnterpriseWorkstation'
@@ -51,7 +51,8 @@ module ForemanAnsible
51
51
  :key => variable_name,
52
52
  :ansible_role_id => role.id
53
53
  )
54
- variable.assign_attributes(:default_value => variable_default,
54
+ variable.assign_attributes(:hidden_value => false,
55
+ :default_value => variable_default,
55
56
  :key_type => infer_key_type(variable_default))
56
57
  variable.imported = true if variable.new_record?
57
58
  variable.valid? ? variable : nil
@@ -80,6 +81,8 @@ module ForemanAnsible
80
81
  variable = AnsibleVariable.new(
81
82
  JSON.parse(attrs)
82
83
  )
84
+ # Make sure, newly created variables are not hidden
85
+ variable.hidden_value = false
83
86
  variable.ansible_role = ::AnsibleRole.find_by(:name => role)
84
87
  variable.save
85
88
  memo << variable
@@ -89,6 +92,8 @@ module ForemanAnsible
89
92
  def update_variables(variables)
90
93
  iterate_over_variables(variables) do |_role, memo, attrs|
91
94
  attributes = JSON.parse(attrs)
95
+ # Make sure to let the flag if a variable is hidden untouched
96
+ attributes.delete('hidden_value')
92
97
  var = AnsibleVariable.find attributes['id']
93
98
  var.update(attributes)
94
99
  memo << var
@@ -4,20 +4,12 @@
4
4
  <div class='tab-pane' id='ansible_roles'>
5
5
  <% roles = f.object.is_a?(Hostgroup) ? roles_attrs(f.object.inherited_and_own_ansible_roles) : roles_attrs(f.object.all_ansible_roles) %>
6
6
  <% class_name = f.object.is_a?(Hostgroup) ? 'Hostgroup' : 'Host' %>
7
- <%= content_tag(:div, '',
8
- :id => 'ansible_roles_switcher',
9
- 'data-roles' => {
10
- :initialAssignedRoles => roles,
11
- :inheritedRoleIds => f.object.inherited_ansible_roles.map(&:id),
12
- :availableRolesUrl => ui_ansible_roles_path,
13
- :resourceId => f.object.id,
14
- :resourceName => class_name,
15
- :canView => User.current.can?(:view_ansible_roles)
16
- }.to_json
17
- ) %>
18
- <% unless request.xhr? %>
19
- <script type="text/javascript">
20
- tfm.initAnsibleRoleSwitcher();
21
- </script>
22
- <% end %>
7
+ <%= react_component('AnsibleRolesSwitcher', {
8
+ :initialAssignedRoles => roles,
9
+ :inheritedRoleIds => f.object.inherited_ansible_roles.map(&:id),
10
+ :availableRolesUrl => ui_ansible_roles_path,
11
+ :resourceId => f.object.id,
12
+ :resourceName => class_name,
13
+ :canView => User.current.can?(:view_ansible_roles)
14
+ }) %>
23
15
  </div>
@@ -25,7 +25,7 @@ model: JobTemplate
25
25
  ---
26
26
  - hosts: all
27
27
  tasks:
28
- - command: ansible-galaxy install {{ item }} <% "-p #{input('location')}" if input('location').present? %>
28
+ - command: ansible-galaxy install {{ item }} -p <%= input('location').present? ? input('location') : '/etc/ansible/roles' %>
29
29
  register: out
30
30
  with_items:
31
31
  - <%= input('ansible_roles_list') %>
@@ -4,5 +4,5 @@
4
4
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
5
5
  # and detect what version the plugin is running.
6
6
  module ForemanAnsible
7
- VERSION = '6.1.1'
7
+ VERSION = '6.2.0'
8
8
  end
data/package.json CHANGED
@@ -7,33 +7,24 @@
7
7
  "test": "test"
8
8
  },
9
9
  "peerDependencies": {
10
- "@theforeman/vendor": ">= 3.3.2"
10
+ "@theforeman/vendor": ">= 6.0.0"
11
11
  },
12
12
  "dependencies": {
13
13
  "react-json-tree": "^0.11.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@babel/core": "^7.7.0",
17
- "@theforeman/builder": "^4.0.2",
18
- "@theforeman/vendor-dev": "^3.3.2",
19
- "babel-eslint": "^10.0.0",
20
- "babel-jest": "^24.9.0",
21
- "enzyme": "^3.7.0",
22
- "enzyme-adapter-react-16": "^1.7.0",
23
- "enzyme-to-json": "^3.3.5",
24
- "eslint": "^6.0.0",
25
- "eslint-plugin-patternfly-react": "^0.2.1",
26
- "identity-obj-proxy": "^3.0.0",
27
- "jest": "^24.9.0",
28
- "prettier": "^1.19.0",
29
- "react-redux": "^5.0.7",
30
- "react-redux-test-utils": "^0.1.1",
31
- "redux": "^3.7.2",
32
- "redux-thunk": "^2.3.0"
17
+ "@theforeman/builder": "^6.0.0",
18
+ "@theforeman/eslint-plugin-foreman": "6.0.0",
19
+ "@theforeman/test": "^6.0.0",
20
+ "@theforeman/vendor-dev": "^6.0.0",
21
+ "babel-eslint": "^10.0.3",
22
+ "eslint": "^6.7.2",
23
+ "prettier": "^1.13.5"
33
24
  },
34
25
  "scripts": {
35
- "test": "node node_modules/.bin/jest webpack",
36
- "lint": "eslint ./webpack"
26
+ "test": "tfm-test --plugin",
27
+ "lint": "tfm-lint --plugin -d webpack"
37
28
  },
38
29
  "repository": {
39
30
  "type": "git",
@@ -44,27 +35,5 @@
44
35
  "bugs": {
45
36
  "url": "https://projects.theforeman.org/projects/ansible"
46
37
  },
47
- "homepage": "https://theforeman.org/plugins/foreman_ansible/",
48
- "jest": {
49
- "verbose": true,
50
- "moduleDirectories": [
51
- "node_modules/@theforeman/vendor-core/node_modules",
52
- "node_modules",
53
- "webpack"
54
- ],
55
- "transform": {
56
- "^.+\\.js$": "babel-jest"
57
- },
58
- "setupFiles": [
59
- "raf/polyfill",
60
- "./webpack/test_setup.js"
61
- ],
62
- "testPathIgnorePatterns": [
63
- "/node_modules/",
64
- "<rootDir>/foreman/"
65
- ],
66
- "moduleNameMapper": {
67
- "^.+\\.(css|scss)$": "identity-obj-proxy"
68
- }
69
- }
38
+ "homepage": "https://theforeman.org/plugins/foreman_ansible/"
70
39
  }
@@ -59,6 +59,19 @@ class AnsibleVariablesImporterTest < ActiveSupport::TestCase
59
59
  assert_empty changes['update']
60
60
  end
61
61
 
62
+ test 'sets hidden value to false by default' do
63
+ role = FactoryBot.create(:ansible_role)
64
+ variable = FactoryBot.create(:ansible_variable)
65
+ api_response = {
66
+ role.name => { variable.key => 'new value' }
67
+ }
68
+ changes = importer.import_variables(api_response, [role.name])
69
+ assert_empty changes['update']
70
+ assert_not_empty changes['new']
71
+ assert_equal variable.key, changes['new'].first.key
72
+ assert_not changes['new'].first.hidden_value?
73
+ end
74
+
62
75
  test 'reimports variable with same key for different role' do
63
76
  role = FactoryBot.create(:ansible_role)
64
77
  variable = FactoryBot.create(:ansible_variable)
@@ -17,7 +17,7 @@ class AnsibleRolesSwitcher extends React.Component {
17
17
  inheritedRoleIds,
18
18
  resourceId,
19
19
  resourceName,
20
- } = this.props.data;
20
+ } = this.props;
21
21
 
22
22
  this.props.getAnsibleRoles(
23
23
  availableRolesUrl,
@@ -52,7 +52,7 @@ class AnsibleRolesSwitcher extends React.Component {
52
52
  inheritedRoleIds,
53
53
  resourceId,
54
54
  resourceName,
55
- } = this.props.data;
55
+ } = this.props;
56
56
 
57
57
  const onListingChange = paginationArgs =>
58
58
  getAnsibleRoles(
@@ -104,13 +104,11 @@ class AnsibleRolesSwitcher extends React.Component {
104
104
  }
105
105
 
106
106
  AnsibleRolesSwitcher.propTypes = {
107
- data: PropTypes.shape({
108
- initialAssignedRoles: PropTypes.arrayOf(PropTypes.object),
109
- availableRolesUrl: PropTypes.string,
110
- inheritedRoleIds: PropTypes.arrayOf(PropTypes.number),
111
- resourceId: PropTypes.number,
112
- resourceName: PropTypes.string,
113
- }).isRequired,
107
+ initialAssignedRoles: PropTypes.arrayOf(PropTypes.object),
108
+ availableRolesUrl: PropTypes.string.isRequired,
109
+ inheritedRoleIds: PropTypes.arrayOf(PropTypes.number),
110
+ resourceId: PropTypes.number,
111
+ resourceName: PropTypes.string,
114
112
  getAnsibleRoles: PropTypes.func.isRequired,
115
113
  loading: PropTypes.bool.isRequired,
116
114
  pagination: PropTypes.shape({
@@ -137,6 +135,10 @@ AnsibleRolesSwitcher.propTypes = {
137
135
 
138
136
  AnsibleRolesSwitcher.defaultProps = {
139
137
  error: {},
138
+ resourceId: null,
139
+ resourceName: '',
140
+ initialAssignedRoles: [],
141
+ inheritedRoleIds: [],
140
142
  };
141
143
 
142
144
  export default AnsibleRolesSwitcher;
@@ -21,7 +21,7 @@ export const getAnsibleRoles = (
21
21
  resourceName,
22
22
  pagination,
23
23
  search
24
- ) => dispatch => {
24
+ ) => async dispatch => {
25
25
  dispatch({ type: ANSIBLE_ROLES_REQUEST });
26
26
 
27
27
  const params = {
@@ -30,19 +30,19 @@ export const getAnsibleRoles = (
30
30
  ...propsToSnakeCase({ resourceId, resourceName }),
31
31
  };
32
32
 
33
- return api
34
- .get(url, {}, params)
35
- .then(({ data }) =>
36
- dispatch({
37
- type: ANSIBLE_ROLES_SUCCESS,
38
- payload: {
39
- initialAssignedRoles,
40
- inheritedRoleIds,
41
- ...propsToCamelCase(data),
42
- },
43
- })
44
- )
45
- .catch(error => dispatch(errorHandler(ANSIBLE_ROLES_FAILURE, error)));
33
+ try {
34
+ const res = await api.get(url, {}, params);
35
+ return dispatch({
36
+ type: ANSIBLE_ROLES_SUCCESS,
37
+ payload: {
38
+ initialAssignedRoles,
39
+ inheritedRoleIds,
40
+ ...propsToCamelCase(res.data),
41
+ },
42
+ });
43
+ } catch (error) {
44
+ return dispatch(errorHandler(ANSIBLE_ROLES_FAILURE, error));
45
+ }
46
46
  };
47
47
 
48
48
  const errorHandler = (msg, err) => {
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AnsibleRolesSwitcher from '../AnsibleRolesSwitcher';
4
4
 
@@ -19,10 +19,10 @@ const fixtures = {
19
19
  assignedRolesCount: 2,
20
20
  assignedRoles: [],
21
21
  unassignedRoles: [],
22
- data: {
23
- initialAssignedRoles: [],
24
- },
22
+ initialAssignedRoles: [],
25
23
  error: { statusText: '', errorMsg: '' },
24
+ allAssignedRoles: [],
25
+ availableRolesUrl: 'http://test/roles',
26
26
  },
27
27
  };
28
28
 
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import reducer, { initialState } from '../AnsibleRolesSwitcherReducer';
4
4
  import { ansibleRolesLong } from '../__fixtures__/ansibleRolesData.fixtures';
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  selectUnassignedRoles,
@@ -61,6 +61,7 @@ exports[`AnsibleRolesSwitcher should render 1`] = `
61
61
  </h2>
62
62
  </div>
63
63
  <AssignedRolesList
64
+ allAssignedRoles={Array []}
64
65
  assignedRoles={Array []}
65
66
  itemCount={2}
66
67
  onPaginationChange={[Function]}
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
  import AnsiblePermissionDenied from './AnsiblePermissionDenied';
3
3
 
4
4
  jest.mock('foremanReact/components/common/EmptyState');
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AnsibleRole from './AnsibleRole';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AssignedRolesList from './AssignedRolesList';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AvailableRolesList from './AvailableRolesList';
4
4
 
@@ -37,5 +37,5 @@ const mapDispatchToProps = dispatch =>
37
37
  export default withProtectedView(
38
38
  connect(mapStateToProps, mapDispatchToProps)(AnsibleRolesSwitcher),
39
39
  AnsiblePermissionDenied,
40
- props => props.data && props.data.canView
40
+ props => props.canView
41
41
  );
data/webpack/index.js CHANGED
@@ -1,12 +1,9 @@
1
- import $ from 'jquery';
2
1
  import componentRegistry from 'foremanReact/components/componentRegistry';
3
2
  import injectReducer from 'foremanReact/redux/reducers/registerReducer';
4
3
  import ReportJsonViewer from './components/ReportJsonViewer';
5
4
  import AnsibleRolesSwitcher from './components/AnsibleRolesSwitcher';
6
5
  import reducer from './reducer';
7
6
 
8
- const { tfm } = window;
9
-
10
7
  componentRegistry.register({
11
8
  name: 'ReportJsonViewer',
12
9
  type: ReportJsonViewer,
@@ -17,13 +14,3 @@ componentRegistry.register({
17
14
  });
18
15
 
19
16
  injectReducer('foremanAnsible', reducer);
20
-
21
- tfm.initAnsibleRoleSwitcher = () => {
22
- $(document).on('ContentLoad', evt => {
23
- tfm.reactMounter.mount(
24
- 'AnsibleRolesSwitcher',
25
- '#ansible_roles_switcher',
26
- $('#ansible_roles_switcher').data('roles')
27
- );
28
- });
29
- };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-22 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_ansible_core
@@ -328,12 +328,11 @@ files:
328
328
  - webpack/components/ReportJsonViewer.js
329
329
  - webpack/index.js
330
330
  - webpack/reducer.js
331
- - webpack/test_setup.js
332
331
  homepage: https://github.com/theforeman/foreman_ansible
333
332
  licenses:
334
333
  - GPL-3.0
335
334
  metadata: {}
336
- post_install_message:
335
+ post_install_message:
337
336
  rdoc_options: []
338
337
  require_paths:
339
338
  - lib
@@ -349,25 +348,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
348
  version: '0'
350
349
  requirements: []
351
350
  rubygems_version: 3.1.2
352
- signing_key:
351
+ signing_key:
353
352
  specification_version: 4
354
353
  summary: Ansible integration with Foreman (theforeman.org)
355
354
  test_files:
356
355
  - test/factories/ansible_proxy.rb
357
- - test/factories/ansible_roles.rb
358
356
  - test/factories/ansible_variables.rb
357
+ - test/factories/ansible_roles.rb
359
358
  - test/fixtures/insights_playbook.yaml
360
359
  - test/fixtures/report.json
361
360
  - test/fixtures/sample_facts.json
362
361
  - test/functional/ansible_roles_controller_test.rb
363
- - test/functional/ansible_variables_controller_test.rb
364
362
  - test/functional/api/v2/ansible_inventories_controller_test.rb
365
363
  - test/functional/api/v2/ansible_roles_controller_test.rb
366
364
  - test/functional/api/v2/ansible_variables_controller_test.rb
367
365
  - test/functional/api/v2/hostgroups_controller_test.rb
368
366
  - test/functional/api/v2/hosts_controller_test.rb
369
- - test/functional/hosts_controller_test.rb
370
367
  - test/functional/ui_ansible_roles_controller_test.rb
368
+ - test/functional/ansible_variables_controller_test.rb
369
+ - test/functional/hosts_controller_test.rb
371
370
  - test/test_plugin_helper.rb
372
371
  - test/unit/actions/run_ansible_job_test.rb
373
372
  - test/unit/actions/run_proxy_ansible_command_test.rb
@@ -377,14 +376,11 @@ test_files:
377
376
  - test/unit/concerns/host_managed_extensions_test.rb
378
377
  - test/unit/concerns/hostgroup_extensions_test.rb
379
378
  - test/unit/helpers/ansible_reports_helper_test.rb
380
- - test/unit/host_ansible_role_test.rb
381
- - test/unit/hostgroup_ansible_role_test.rb
382
379
  - test/unit/lib/foreman_ansible_core/command_creator_test.rb
383
380
  - test/unit/lib/foreman_ansible_core/ansible_runner_test.rb
384
381
  - test/unit/lib/foreman_ansible_core/playbook_runner_test.rb
385
382
  - test/unit/lib/proxy_api/ansible_test.rb
386
383
  - test/unit/services/ansible_report_importer_test.rb
387
- - test/unit/services/ansible_variables_importer_test.rb
388
384
  - test/unit/services/api_roles_importer_test.rb
389
385
  - test/unit/services/fact_importer_test.rb
390
386
  - test/unit/services/fact_parser_test.rb
@@ -392,6 +388,9 @@ test_files:
392
388
  - test/unit/services/insights_plan_runner_test.rb
393
389
  - test/unit/services/roles_importer_test.rb
394
390
  - test/unit/services/structured_fact_importer_test.rb
395
- - test/unit/services/ui_roles_importer_test.rb
391
+ - test/unit/services/ansible_variables_importer_test.rb
396
392
  - test/unit/services/inventory_creator_test.rb
393
+ - test/unit/services/ui_roles_importer_test.rb
397
394
  - test/unit/ansible_provider_test.rb
395
+ - test/unit/host_ansible_role_test.rb
396
+ - test/unit/hostgroup_ansible_role_test.rb
@@ -1,12 +0,0 @@
1
- import 'core-js/shim';
2
- import 'regenerator-runtime/runtime';
3
-
4
- import { configure } from 'enzyme';
5
- import Adapter from 'enzyme-adapter-react-16';
6
-
7
- configure({ adapter: new Adapter() });
8
-
9
- // Mocking translation function
10
- global.__ = str => str;
11
- global.n__ = str => str;
12
- global.Jed = { sprintf: str => str };