Skip to content

Commit

Permalink
http-api: T6736: update smoketest for syntax change
Browse files Browse the repository at this point in the history
  • Loading branch information
jestabro committed Sep 30, 2024
1 parent f402c9f commit 6dbacab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions smoketest/scripts/cli/test_service_https.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def test_api_auth(self):
key = 'MySuperSecretVyOS'
self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])

self.cli_set(base_path + ['api', 'rest'])

self.cli_set(base_path + ['listen-address', address])

self.cli_commit()
Expand Down Expand Up @@ -304,6 +306,7 @@ def test_api_add_delete(self):
self.assertEqual(r.status_code, 503)

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()
sleep(2)

Expand All @@ -326,6 +329,7 @@ def test_api_show(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload = {
Expand All @@ -343,6 +347,7 @@ def test_api_generate(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload = {
Expand All @@ -362,6 +367,7 @@ def test_api_configure(self):
conf_address = '192.0.2.44/32'

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload_path = [
Expand All @@ -385,6 +391,7 @@ def test_api_config_file(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload = {
Expand All @@ -402,6 +409,7 @@ def test_api_reset(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload = {
Expand All @@ -419,6 +427,7 @@ def test_api_image(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

payload = {
Expand Down Expand Up @@ -462,6 +471,7 @@ def test_api_config_file_load_http(self):
headers = {}

self.cli_set(base_path + ['api', 'keys', 'id', 'key-01', 'key', key])
self.cli_set(base_path + ['api', 'rest'])
self.cli_commit()

# load config via HTTP requires nginx config
Expand Down

0 comments on commit 6dbacab

Please sign in to comment.