|
22 | 22 | end |
23 | 23 |
|
24 | 24 | TEST_HOST, TEST_PORT = split_hosts.first.split(':') |
| 25 | +else |
| 26 | + TEST_HOST, TEST_PORT = 'localhost', 9200 |
25 | 27 | end |
26 | 28 |
|
27 | 29 | raw_certificate = File.read(File.join(PROJECT_PATH, '/.ci/certs/testnode.crt')) |
|
56 | 58 | end |
57 | 59 |
|
58 | 60 |
|
59 | | - |
60 | 61 | YAML_FILES_DIRECTORY = "#{File.expand_path(File.dirname('..'), '..')}" + |
61 | 62 | "/tmp/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test" |
62 | | -skipped_files = [] |
| 63 | +SINGLE_TEST = if ENV['SINGLE_TEST'] |
| 64 | + ["#{File.expand_path(File.dirname('..'), '..')}" + |
| 65 | + "/tmp/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/#{ENV['SINGLE_TEST']}"] |
| 66 | + end |
63 | 67 |
|
64 | | -# Respone from Elasticsearch includes the ca.crt, so length doesn't match. |
65 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/ssl/10_basic.yml") |
| 68 | +SKIPPED_TESTS = [] |
66 | 69 |
|
67 | | -# Current license is basic. |
68 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/license/20_put_license.yml") |
| 70 | +# Response from Elasticsearch includes the ca.crt, so length doesn't match. |
| 71 | +SKIPPED_TESTS << { file: 'ssl/10_basic.yml', |
| 72 | + description: 'Test get SSL certificates' } |
69 | 73 |
|
70 | | -# ArgumentError for empty body |
71 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/watcher/put_watch/10_basic.yml") |
| 74 | +# Searching the monitoring index returns no results. |
| 75 | +SKIPPED_TESTS << { file: 'monitoring/bulk/20_privileges.yml', |
| 76 | + description: 'Monitoring Bulk API' } |
72 | 77 |
|
73 | | -# The number of shards when a snapshot is successfully created is more than 1. Maybe because of the security index? |
74 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/snapshot/10_basic.yml") |
| 78 | +# Searching the monitoring index returns no results. |
| 79 | +SKIPPED_TESTS << { file: 'monitoring/bulk/10_basic.yml', |
| 80 | + description: 'Bulk indexing of monitoring data on closed indices should throw an export exception' } |
75 | 81 |
|
76 | 82 | # The test inserts an invalid license, which makes all subsequent tests fail. |
77 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/xpack/15_basic.yml") |
| 83 | +SKIPPED_TESTS << { file: 'xpack/15_basic.yml', |
| 84 | + description: '*' } |
78 | 85 |
|
79 | | -# 'invalidated_tokens' is returning 5 in 'Test invalidate user's tokens' test. |
80 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/token/10_basic.yml") |
| 86 | +# The test inserts an invalid license, which makes all subsequent tests fail. |
| 87 | +SKIPPED_TESTS << { file: 'license/20_put_license.yml', |
| 88 | + description: '*' } |
81 | 89 |
|
82 | | -# 'invalidated_tokens' is returning 5 in 'Test invalidate user's tokens' test. |
83 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/token/10_basic.yml") |
| 90 | +# The test inserts an invalid license, which makes all subsequent tests fail. |
| 91 | +SKIPPED_TESTS << { file: 'token/10_basic.yml', |
| 92 | + description: "Test invalidate user's tokens" } |
84 | 93 |
|
85 | | -# Searching the monitoring index returns no results. |
86 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/monitoring/bulk/10_basic.yml") |
87 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/monitoring/bulk/20_privileges.yml") |
| 94 | +# The test inserts an invalid license, which makes all subsequent tests fail. |
| 95 | +SKIPPED_TESTS << { file: 'token/10_basic.yml', |
| 96 | + description: "Test invalidate realm's tokens" } |
| 97 | + |
| 98 | +# The number of shards when a snapshot is successfully created is more than 1. Maybe because of the security index? |
| 99 | +SKIPPED_TESTS << { file: 'snapshot/10_basic.yml', |
| 100 | + description: 'Create a source only snapshot and then restore it' } |
| 101 | + |
| 102 | +# ArgumentError for empty body |
| 103 | +SKIPPED_TESTS << { file: 'watcher/put_watch/10_basic.yml', |
| 104 | + description: 'Test empty body is rejected by put watch' } |
| 105 | + |
| 106 | +# Operation times out "failed_node_exception" |
| 107 | +SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
| 108 | + description: 'Setting upgrade_mode to enabled' } |
| 109 | + |
| 110 | +# Operation times out "failed_node_exception" |
| 111 | +SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
| 112 | + description: 'Setting upgrade_mode to disabled' } |
| 113 | + |
| 114 | +# Operation times out "failed_node_exception" |
| 115 | +SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
| 116 | + description: 'Setting upgrade mode to disabled from enabled' } |
88 | 117 |
|
89 | 118 | # Operation times out "failed_node_exception" |
90 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/ml/set_upgrade_mode.yml") |
| 119 | +SKIPPED_TESTS << { file: 'ml/set_upgrade_mode.yml', |
| 120 | + description: 'Attempt to open job when upgrade_mode is enabled' } |
91 | 121 |
|
92 | | -# 'Test Deprecations' has non-zero length node_settings field |
93 | | -skipped_files += Dir.glob("#{YAML_FILES_DIRECTORY}/deprecation/10_basic.yml") |
| 122 | +# Non-zero length node_settings field |
| 123 | +SKIPPED_TESTS << { file: 'deprecation/10_basic.yml', |
| 124 | + description: 'Test Deprecations' } |
94 | 125 |
|
95 | | -SINGLE_TEST = nil |
96 | | -# Uncomment the following line and set it to a file when a single test should be run. |
97 | | -# SINGLE_TEST = ["#{File.expand_path(File.dirname('..'), '..')}" + |
98 | | -# "/tmp/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/jobs_crud.yml"] |
99 | 126 |
|
| 127 | +# TODO |
| 128 | +SKIPPED_TESTS << { file: 'ml/forecast.yml', |
| 129 | + description: 'Test forecast unknown job' } |
| 130 | +# TODO |
| 131 | +SKIPPED_TESTS << { file: 'ml/post_data.yml', |
| 132 | + description: 'Test POST data with invalid parameters' } |
| 133 | +# TODO |
| 134 | +SKIPPED_TESTS << { file: 'ml/post_data.yml', |
| 135 | + description: 'Test Flush data with invalid parameters' } |
100 | 136 |
|
101 | | -REST_API_YAML_FILES = SINGLE_TEST || Dir.glob("#{YAML_FILES_DIRECTORY}/**/*.yml") - skipped_files |
| 137 | +REST_API_YAML_FILES = SINGLE_TEST || Dir.glob("#{YAML_FILES_DIRECTORY}/**/*.yml") |
102 | 138 | REST_API_YAML_SKIP_FEATURES = ['warnings'].freeze |
103 | 139 |
|
104 | 140 |
|
|
0 commit comments