Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions test/suites/configuration1/configuration.robot
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ Deploy MicroShift With LVMS By Default
[Setup] Deploy Storage Config ${LVMS_DEFAULT}
LVMS Is Deployed
CSI Snapshot Controller Is Deployed
[Teardown] Run Keywords
... Remove Storage Drop In Config
... Restart MicroShift
[Teardown] Remove Storage Drop In Config

Deploy MicroShift Without LVMS
[Documentation] Verify that LVMS is not deployed when storage.driver == none, and that CSI snapshotting
Expand All @@ -119,9 +117,7 @@ Deploy MicroShift Without LVMS
# Reduce the default timeout to 2 minutes for a quicker failure
Run Keyword And Expect Error 1 != 0
... LVMS Is Deployed timeout=${DEFAULT_WAIT_TIMEOUT}
[Teardown] Run Keywords
... Remove Storage Drop In Config
... Restart MicroShift
[Teardown] Remove Storage Drop In Config

Deploy MicroShift Without CSI Snapshotter
[Documentation] Verify that only LVMS is deployed when .storage.optionalCsiComponents is an empty array.
Expand All @@ -132,9 +128,7 @@ Deploy MicroShift Without CSI Snapshotter
Run Keyword And Expect Error 1 != 0
... CSI Snapshot Controller Is Deployed timeout=${DEFAULT_WAIT_TIMEOUT}

[Teardown] Run Keywords
... Remove Storage Drop In Config
... Restart MicroShift
[Teardown] Remove Storage Drop In Config

Crio Uses Crun Runtime
[Documentation] Verify that crio uses crun as its default runtime
Expand Down Expand Up @@ -163,12 +157,14 @@ Setup
Save Journal Cursor

Teardown
[Documentation] Test suite teardown
[Documentation] Restart MicroShift to restore clean state after the last test
... (per-test teardowns skip the restart), then clean up.
Remove Drop In MicroShift Config 10-loglevel
Remove Drop In MicroShift Config 10-audit
Remove Drop In MicroShift Config 10-storage
Restart MicroShift
Logout MicroShift Host
Remove Kubeconfig
Logout MicroShift Host

Save Journal Cursor
[Documentation]
Expand Down
20 changes: 12 additions & 8 deletions test/suites/configuration1/dns-resource-configuration.robot
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ${DNS_LIMIT_LESS_THAN_REQUEST} SEPARATOR=\n
*** Test Cases ***
Default DNS Resources
[Documentation] Verify default DNS resources when no custom config is applied
[Setup] Remove DNS Resource Config
[Setup] Run Keywords Remove DNS Resource Config AND Restart MicroShift
DNS Resource Value Should Be ${DNS_RESOURCE_PATH}.requests.cpu 50m
DNS Resource Value Should Be ${DNS_RESOURCE_PATH}.requests.memory 70Mi

Expand Down Expand Up @@ -107,13 +107,13 @@ Invalid Resource Quantity Prevents Start
[Documentation] Verify MicroShift fails to start with invalid resource quantity
[Setup] Apply Invalid DNS Resource Config ${DNS_INVALID_QUANTITY}
Pattern Should Appear In Log Output ${CURSOR} invalid dns resource request
[Teardown] Remove DNS Resource Config
[Teardown] Run Keywords Remove DNS Resource Config AND Restart MicroShift

Limit Less Than Request Prevents Start
[Documentation] Verify MicroShift fails to start when limit is less than request
[Setup] Apply Invalid DNS Resource Config ${DNS_LIMIT_LESS_THAN_REQUEST}
Pattern Should Appear In Log Output ${CURSOR} must be greater than or equal to request
[Teardown] Remove DNS Resource Config
[Teardown] Run Keywords Remove DNS Resource Config AND Restart MicroShift

DNS Resolution After Resource Change
[Documentation] Verify CoreDNS resolves cluster-local services after resource change
Expand All @@ -132,7 +132,10 @@ Setup
Setup Kubeconfig

Teardown
[Documentation] Test suite teardown
[Documentation] Restart MicroShift to restore clean state after the last test
... (per-test teardowns skip the restart), then clean up.
Remove Drop In MicroShift Config ${DNS_DROPIN}
Restart MicroShift
Remove Kubeconfig
Logout MicroShift Host

Expand Down Expand Up @@ -169,20 +172,21 @@ DNS Resource Value Should Match Empty
Apply DNS Resource Config
[Documentation] Remove any existing drop-in, apply a new DNS resource config and restart MicroShift
[Arguments] ${config}
Remove DNS Resource Config
Remove Drop In MicroShift Config ${DNS_DROPIN}
Drop In MicroShift Config ${config} ${DNS_DROPIN}
Restart MicroShift

Apply Invalid DNS Resource Config
[Documentation] Apply an invalid DNS resource config that should prevent MicroShift from starting
[Arguments] ${config}
Remove DNS Resource Config
Remove Drop In MicroShift Config ${DNS_DROPIN}
Restart MicroShift
Drop In MicroShift Config ${config} ${DNS_DROPIN}
${cursor}= Get Journal Cursor
VAR ${CURSOR}= ${cursor} scope=TEST
Run Keyword And Expect Error 0 != 1 Restart MicroShift

Remove DNS Resource Config
[Documentation] Remove the DNS resource drop-in config and restart MicroShift
[Documentation] Remove the DNS resource drop-in config without restarting.
... The next test's setup will restart MicroShift.
Remove Drop In MicroShift Config ${DNS_DROPIN}
Restart MicroShift
26 changes: 8 additions & 18 deletions test/suites/configuration2/audit-log.robot
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ Invalid Audit Profile Prevents Startup

[Teardown] Run Keywords
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift
... AND Restart MicroShift

Invalid Audit Rotation Values Prevent Startup
[Documentation] Non-integer rotation parameters should prevent MicroShift from starting.
Expand All @@ -78,8 +77,7 @@ Invalid Audit Rotation Values Prevent Startup

[Teardown] Run Keywords
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift
... AND Restart MicroShift

Audit Profile None Produces No Logs
[Documentation] With profile None, no audit entries should be written.
Expand All @@ -96,8 +94,6 @@ Audit Profile None Produces No Logs
... Oc Delete configmap ${cm_name} -n ${TEST_NS} --ignore-not-found
... AND
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift

Audit Profile Default Logs Metadata Only
[Documentation] Default profile should log metadata but not request/response bodies.
Expand All @@ -118,8 +114,6 @@ Audit Profile Default Logs Metadata Only
... Oc Delete configmap ${cm_name} -n ${TEST_NS} --ignore-not-found
... AND
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift

Audit Profile WriteRequestBodies Logs Write Operations
[Documentation] WriteRequestBodies should log request bodies for write operations
Expand All @@ -141,8 +135,6 @@ Audit Profile WriteRequestBodies Logs Write Operations
... Oc Delete configmap ${cm_name} -n ${TEST_NS} --ignore-not-found
... AND
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift

Audit Profile AllRequestBodies Logs All Operations
[Documentation] AllRequestBodies should log request bodies for all operations.
Expand All @@ -163,8 +155,6 @@ Audit Profile AllRequestBodies Logs All Operations
... Oc Delete configmap ${cm_name} -n ${TEST_NS} --ignore-not-found
... AND
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift

Audit Log File Exists With Correct Permissions
[Documentation] Verify the audit log file exists at the expected path with correct
Expand All @@ -182,10 +172,7 @@ Audit Log Rotation Respects Max File Size And Count
Wait Until Keyword Succeeds 60x 5s
... Audit Backup Files Should Match 2

[Teardown] Run Keywords
... Remove Drop In MicroShift Config 10-audit
... AND
... Restart MicroShift
[Teardown] Remove Drop In MicroShift Config 10-audit


*** Keywords ***
Expand All @@ -198,10 +185,13 @@ Setup
Oc Create namespace ${TEST_NS}

Teardown
[Documentation] Test suite teardown
[Documentation] Restart MicroShift to restore clean state after the last test
... (per-test teardowns skip the restart), then clean up.
Remove Drop In MicroShift Config 10-audit
Restart MicroShift
Oc Delete namespace ${TEST_NS} --ignore-not-found
Logout MicroShift Host
Remove Kubeconfig
Logout MicroShift Host

Grep Audit Log Count
[Documentation] Count audit log entries matching the resource name
Expand Down
18 changes: 8 additions & 10 deletions test/suites/configuration2/kustomize-sources.robot
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ Multiple Kustomize Paths
... AND Remove Manifest Directory ${MANIFEST_DIR_2}
... AND Oc Delete namespace ksrc-multi-ns-1 --ignore-not-found
... AND Oc Delete namespace ksrc-multi-ns-2 --ignore-not-found
... AND Restart MicroShift

Path Without Kustomization File Is Ignored
[Documentation] A path that exists but has no kustomization.yaml should be silently ignored.
Expand All @@ -103,17 +102,14 @@ Path Without Kustomization File Is Ignored
[Teardown] Run Keywords
... Remove Drop In MicroShift Config 10-kustomize
... AND Remove Manifest Directory ${MANIFEST_DIR_1}
... AND Restart MicroShift

Non Existent Path Is Ignored
[Documentation] A non-existent path in kustomizePaths should be silently ignored.
Drop In MicroShift Config ${SINGLE_PATH} 10-kustomize

Restart MicroShift

[Teardown] Run Keywords
... Remove Drop In MicroShift Config 10-kustomize
... AND Restart MicroShift
[Teardown] Remove Drop In MicroShift Config 10-kustomize

Unset Kustomize Paths Uses Defaults
[Documentation] Setting kustomizePaths to null should result in the default paths.
Expand Down Expand Up @@ -146,7 +142,6 @@ Glob Patterns In Kustomize Paths
... AND Remove Manifest Directory ${GLOB_BASE}
... AND Oc Delete namespace ksrc-glob-ns-a --ignore-not-found
... AND Oc Delete namespace ksrc-glob-ns-b --ignore-not-found
... AND Restart MicroShift


*** Keywords ***
Expand All @@ -157,15 +152,18 @@ Setup
Setup Kubeconfig

Teardown
[Documentation] Test suite teardown
Logout MicroShift Host
[Documentation] Restart MicroShift to restore clean state after the last test
... (per-test teardowns skip the restart), then clean up.
Remove Drop In MicroShift Config 10-kustomize
Restart MicroShift
Remove Kubeconfig
Logout MicroShift Host

Cleanup Kustomize Test
[Documentation] Standard cleanup for a single-path kustomize test
[Documentation] Standard cleanup for a single-path kustomize test without restarting.
... The next test's setup will restart MicroShift.
[Arguments] ${namespace} ${manifest_dir}
Run Keywords
... Remove Drop In MicroShift Config 10-kustomize
... AND Remove Manifest Directory ${manifest_dir}
... AND Oc Delete namespace ${namespace} --ignore-not-found
... AND Restart MicroShift
4 changes: 2 additions & 2 deletions test/suites/standard1/etcd.robot
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ Set MemoryHigh Limit Unlimited
[Tags] configuration restart slow
[Setup] Setup With Custom Config ${MEMLIMIT0}
Expect MemoryHigh infinity
[Teardown] Restore Default Config
[Teardown] Remove Drop In MicroShift Config 10-etcd

Set MemoryHigh Limit 256MB
[Documentation] Set the memory limit for etcd to 256MB and ensure it takes effect
[Tags] configuration restart slow
[Setup] Setup With Custom Config ${MEMLIMIT256}
# Expecting the setting to be 256 * 1024 * 1024
Expect MemoryHigh 268435456
[Teardown] Restore Default Config
[Teardown] Remove Drop In MicroShift Config 10-etcd


*** Keywords ***
Expand Down
12 changes: 8 additions & 4 deletions test/suites/standard2/feature-gates.robot
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,13 @@ Setup
Setup Kubeconfig # for readiness checks

Teardown
[Documentation] Test suite teardown
Logout MicroShift Host
[Documentation] Start MicroShift to restore clean state after the last test
... (per-test teardowns leave MicroShift stopped), then clean up.
Remove Drop In MicroShift Config 10-featuregates
Remove Feature Gate Lock File If Exists
Restart MicroShift
Remove Kubeconfig
Logout MicroShift Host

Save Journal Cursor
[Documentation]
Expand All @@ -105,11 +109,11 @@ Setup Custom Feature Gates Test
Feature Gate Lock File Should Exist

Teardown Custom Feature Gates Test
[Documentation] Remove custom feature gates config and restart MicroShift
[Documentation] Remove custom feature gates config without restarting.
... The next test's setup will start MicroShift.
Stop MicroShift
Remove Drop In MicroShift Config 10-featuregates
Remove Feature Gate Lock File If Exists
Start MicroShift

Remove Feature Gate Lock File If Exists
[Documentation] Remove the feature gate lock file if it exists, for test cleanup
Expand Down
11 changes: 7 additions & 4 deletions test/suites/telemetry/telemetry.robot
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ Setup
Setup Kubeconfig

Teardown
[Documentation] Test suite teardown
[Documentation] Restart MicroShift to restore clean state after the last test
... (per-test teardowns skip the restart), then clean up.
Remove Drop In MicroShift Config 10-telemetry
Restore Pull Secrets
Restart MicroShift
Wait For MicroShift Healthcheck Success
Logout MicroShift Host
Remove Kubeconfig
Logout MicroShift Host

Check Required Telemetry Variables
[Documentation] Check if the required telemetry variables are set
Expand All @@ -140,10 +144,9 @@ Setup Telemetry Configuration

Remove Telemetry Configuration
[Documentation] Removes the telemetry feature from MicroShift configuration file
... and restarts microshift.service
... without restarting. The next test's setup will restart MicroShift.
Remove Drop In MicroShift Config 10-telemetry
Restore Pull Secrets
Restart MicroShift

Configure Pull Secrets
[Documentation] Sets up the pull secrets for the MicroShift cluster.
Expand Down