From ead77f9a7df7aa252bc3241c1ffceec0e5e42bec Mon Sep 17 00:00:00 2001
From: Alex Kavanagh <alex.kavanagh@canonical.com>
Date: Thu, 8 Feb 2024 10:43:09 +0000
Subject: [PATCH] Updates for caracal testing support

These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal.  They do NOT lock the charms
down, and don't change the testing branches to stable branches.

Change-Id: I4f5df7cd306e69210b53e2c800de609337e8c84f
---
 charmcraft.yaml                               | 64 -------------------
 osci.yaml                                     |  2 +-
 src/metadata.yaml                             |  6 +-
 src/tests/bundles/jammy-antelope.yaml         |  2 +-
 src/tests/bundles/jammy-bobcat.yaml           |  2 +-
 ...{mantic-bobcat.yaml => jammy-caracal.yaml} |  8 +--
 ...lunar-antelope.yaml => noble-caracal.yaml} |  6 +-
 src/tests/tests.yaml                          | 15 ++---
 8 files changed, 19 insertions(+), 86 deletions(-)
 rename src/tests/bundles/{mantic-bobcat.yaml => jammy-caracal.yaml} (89%)
 rename src/tests/bundles/{lunar-antelope.yaml => noble-caracal.yaml} (93%)

diff --git a/charmcraft.yaml b/charmcraft.yaml
index 71c7e68..953004e 100644
--- a/charmcraft.yaml
+++ b/charmcraft.yaml
@@ -52,67 +52,3 @@ bases:
       - name: ubuntu
         channel: "22.04"
         architectures: [arm64]
-  - build-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [amd64]
-    run-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [amd64]
-  - build-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [s390x]
-    run-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [s390x]
-  - build-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [ppc64el]
-    run-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [ppc64el]
-  - build-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [arm64]
-    run-on:
-      - name: ubuntu
-        channel: "23.04"
-        architectures: [arm64]
-  - build-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [amd64]
-    run-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [amd64]
-  - build-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [s390x]
-    run-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [s390x]
-  - build-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [ppc64el]
-    run-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [ppc64el]
-  - build-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [arm64]
-    run-on:
-      - name: ubuntu
-        channel: "23.10"
-        architectures: [arm64]
diff --git a/osci.yaml b/osci.yaml
index 69e050f..aa86e8b 100644
--- a/osci.yaml
+++ b/osci.yaml
@@ -6,4 +6,4 @@
       needs_charm_build: true
       charm_build_name: barbican
       build_type: charmcraft
-      charmcraft_channel: 2.x/edge
+      charmcraft_channel: 2.x/stable
diff --git a/src/metadata.yaml b/src/metadata.yaml
index 8046685..8d37cfd 100644
--- a/src/metadata.yaml
+++ b/src/metadata.yaml
@@ -6,11 +6,9 @@ description: |
   management of secrets such as passwords and encryption keys. It is aimed at
   being useful for all environments, including large ephemeral Clouds
 tags:
-- openstack
+  - openstack
 series:
-- jammy
-- lunar
-- mantic
+  - jammy
 subordinate: false
 requires:
   shared-db:
diff --git a/src/tests/bundles/jammy-antelope.yaml b/src/tests/bundles/jammy-antelope.yaml
index 27a0e5d..d4799c1 100644
--- a/src/tests/bundles/jammy-antelope.yaml
+++ b/src/tests/bundles/jammy-antelope.yaml
@@ -43,7 +43,7 @@ applications:
       openstack-origin: *openstack-origin
     to:
       - '3'
-    channel: latest/edge
+    channel: 2024.1/edge
 
   barbican:
     series: *series
diff --git a/src/tests/bundles/jammy-bobcat.yaml b/src/tests/bundles/jammy-bobcat.yaml
index 60d2534..226304c 100644
--- a/src/tests/bundles/jammy-bobcat.yaml
+++ b/src/tests/bundles/jammy-bobcat.yaml
@@ -43,7 +43,7 @@ applications:
       openstack-origin: *openstack-origin
     to:
       - '3'
-    channel: latest/edge
+    channel: 2024.1/edge
 
   barbican:
     series: *series
diff --git a/src/tests/bundles/mantic-bobcat.yaml b/src/tests/bundles/jammy-caracal.yaml
similarity index 89%
rename from src/tests/bundles/mantic-bobcat.yaml
rename to src/tests/bundles/jammy-caracal.yaml
index 25dcf5b..2ea28db 100644
--- a/src/tests/bundles/mantic-bobcat.yaml
+++ b/src/tests/bundles/jammy-caracal.yaml
@@ -1,9 +1,9 @@
 variables:
-  openstack-origin: &openstack-origin distro
+  openstack-origin: &openstack-origin cloud:jammy-caracal
 
 local_overlay_enabled: False
 
-series: &series mantic
+series: &series jammy
 
 machines:
   '0':
@@ -43,11 +43,11 @@ applications:
       openstack-origin: *openstack-origin
     to:
       - '3'
-    channel: latest/edge
+    channel: 2024.1/edge
 
   barbican:
     series: *series
-    charm: ../../../barbican_ubuntu-23.10-amd64.charm
+    charm: ../../../barbican_ubuntu-22.04-amd64.charm
     num_units: 1
     options:
       openstack-origin: *openstack-origin
diff --git a/src/tests/bundles/lunar-antelope.yaml b/src/tests/bundles/noble-caracal.yaml
similarity index 93%
rename from src/tests/bundles/lunar-antelope.yaml
rename to src/tests/bundles/noble-caracal.yaml
index f7e09b6..5f9a7fe 100644
--- a/src/tests/bundles/lunar-antelope.yaml
+++ b/src/tests/bundles/noble-caracal.yaml
@@ -3,7 +3,7 @@ variables:
 
 local_overlay_enabled: False
 
-series: &series lunar
+series: &series noble
 
 machines:
   '0':
@@ -43,11 +43,11 @@ applications:
       openstack-origin: *openstack-origin
     to:
       - '3'
-    channel: latest/edge
+    channel: 2024.1/edge
 
   barbican:
     series: *series
-    charm: ../../../barbican_ubuntu-23.04-amd64.charm
+    charm: ../../../barbican_ubuntu-22.04-amd64.charm
     num_units: 1
     options:
       openstack-origin: *openstack-origin
diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml
index 37eff88..21155b4 100644
--- a/src/tests/tests.yaml
+++ b/src/tests/tests.yaml
@@ -1,15 +1,14 @@
 charm_name: barbican
 smoke_bundles:
-- jammy-antelope
+  - jammy-caracal
 gate_bundles:
-- jammy-antelope
+  - jammy-antelope
+  - jammy-bobcat
+  - jammy-caracal
 dev_bundles:
-- jammy-bobcat
-- lunar-antelope
-- mantic-bobcat
+  - noble-caracal
 tests:
-- zaza.openstack.charm_tests.barbican.tests.BarbicanTest
+  - zaza.openstack.charm_tests.barbican.tests.BarbicanTest
 tests_options:
   force_deploy:
-    - lunar-antelope
-    - mantic-bobcat
+    - noble-caracal