From 28b20a1e2f7aaba075c8218c34dbe57dde1d47cf Mon Sep 17 00:00:00 2001 From: alex <8968914+acpana@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:05:24 -0800 Subject: [PATCH] refactor:tests: field management scenario tests (#3200) * refactor:tests: field management scenario tests Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com> * Update tests/e2e/testdata/scenarios/fields/management/README.md --------- Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com> --- .../scenarios/fields/management/README.md | 19 +++++++++++++++++++ .../featuremembership}/set_unset/_http00.log | 0 .../featuremembership}/set_unset/_http01.log | 0 .../featuremembership}/set_unset/_http02.log | 0 .../featuremembership}/set_unset/_http03.log | 0 .../featuremembership}/set_unset/_http04.log | 0 .../featuremembership}/set_unset/_http05.log | 0 .../set_unset/_object00.yaml | 0 .../set_unset/_object01.yaml | 0 .../set_unset/_object02.yaml | 0 .../set_unset/_object03.yaml | 0 .../set_unset/_object04.yaml | 0 .../set_unset/_object05.yaml | 0 .../featuremembership}/set_unset/script.yaml | 0 .../logmetric/set_unset}/SCENARIO_README.md | 0 .../logmetric/set_unset}/basic/_export0.yaml | 0 .../logmetric/set_unset}/basic/_export1.yaml | 0 .../logmetric/set_unset}/basic/_export2.yaml | 0 .../logmetric/set_unset}/basic/_http00.log | 0 .../logmetric/set_unset}/basic/_http01.log | 0 .../logmetric/set_unset}/basic/_http02.log | 0 .../logmetric/set_unset}/basic/_object00.yaml | 0 .../logmetric/set_unset}/basic/_object01.yaml | 0 .../logmetric/set_unset}/basic/_object02.yaml | 0 .../logmetric/set_unset}/basic/script.yaml | 0 .../metric_descriptor/_export0.yaml | 0 .../metric_descriptor/_export1.yaml | 0 .../metric_descriptor/_export2.yaml | 0 .../set_unset}/metric_descriptor/_http00.log | 0 .../set_unset}/metric_descriptor/_http01.log | 0 .../set_unset}/metric_descriptor/_http02.log | 0 .../metric_descriptor/_object00.yaml | 0 .../metric_descriptor/_object01.yaml | 0 .../metric_descriptor/_object02.yaml | 0 .../set_unset}/metric_descriptor/script.yaml | 0 35 files changed, 19 insertions(+) create mode 100644 tests/e2e/testdata/scenarios/fields/management/README.md rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http00.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http01.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http02.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http03.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http04.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_http05.log (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object00.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object01.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object02.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object03.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object04.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/_object05.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{gkehubfeaturemembership => management/gkehub/featuremembership}/set_unset/script.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/SCENARIO_README.md (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_export0.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_export1.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_export2.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_http00.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_http01.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_http02.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_object00.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_object01.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/_object02.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/basic/script.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_export0.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_export1.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_export2.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_http00.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_http01.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_http02.log (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_object00.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_object01.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/_object02.yaml (100%) rename tests/e2e/testdata/scenarios/fields/{llm_set_unset => management/logging/logmetric/set_unset}/metric_descriptor/script.yaml (100%) diff --git a/tests/e2e/testdata/scenarios/fields/management/README.md b/tests/e2e/testdata/scenarios/fields/management/README.md new file mode 100644 index 0000000000..84f15dacd1 --- /dev/null +++ b/tests/e2e/testdata/scenarios/fields/management/README.md @@ -0,0 +1,19 @@ +This test folder contains scenarios for setting and unsetting a field. + +Unsetting a native field (int, bool, string) in the underlying GCP resource that a Config Connector resource manages can be achieved by setting the corresponding field in the Config Connector resource to its 0 value. This means setting an int field to `0`, a bool field to `false`, a string field to `""` (and etc). + +The folder structure should follow: + +``` +tests + └─e2e + └─testdata + └─scenarios + ├─fields + │ ├─management + │ │ └─SERVICE_NAME + │ │ └─RESOURCE_NAME + │ │ └─scenario_A + │ └─other_fields_related_scenarios + └─other_top_level_scenarios +``` \ No newline at end of file diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http00.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http00.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http00.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http00.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http01.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http01.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http01.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http01.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http02.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http02.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http02.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http02.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http03.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http03.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http03.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http03.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http04.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http04.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http04.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http04.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http05.log b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http05.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_http05.log rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_http05.log diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object00.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object00.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object00.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object00.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object01.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object01.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object01.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object01.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object02.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object02.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object02.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object02.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object03.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object03.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object03.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object03.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object04.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object04.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object04.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object04.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object05.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object05.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/_object05.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/_object05.yaml diff --git a/tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/script.yaml b/tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/script.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/gkehubfeaturemembership/set_unset/script.yaml rename to tests/e2e/testdata/scenarios/fields/management/gkehub/featuremembership/set_unset/script.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/SCENARIO_README.md b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/SCENARIO_README.md similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/SCENARIO_README.md rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/SCENARIO_README.md diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export0.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export0.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export0.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export0.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export1.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export1.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export1.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export1.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export2.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export2.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_export2.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_export2.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http00.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http00.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http00.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http01.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http01.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http01.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http02.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_http02.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_http02.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object00.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object00.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object00.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object00.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object01.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object01.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object01.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object01.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object02.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object02.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/_object02.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/_object02.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/script.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/script.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/basic/script.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/basic/script.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export0.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export0.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export0.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export0.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export1.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export1.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export1.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export1.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export2.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export2.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_export2.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_export2.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http00.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http00.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http00.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http01.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http01.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http01.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http02.log similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_http02.log rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_http02.log diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object00.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object00.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object00.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object00.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object01.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object01.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object01.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object01.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object02.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object02.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/_object02.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/_object02.yaml diff --git a/tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/script.yaml b/tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/script.yaml similarity index 100% rename from tests/e2e/testdata/scenarios/fields/llm_set_unset/metric_descriptor/script.yaml rename to tests/e2e/testdata/scenarios/fields/management/logging/logmetric/set_unset/metric_descriptor/script.yaml