mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-09-06 23:12:21 +02:00
Compare commits
9 Commits
a3603b770e
...
c871707ffa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c871707ffa | ||
|
|
c592966a4a | ||
|
|
173c6d622b | ||
|
|
3c273641e3 | ||
|
|
8af1fa77f8 | ||
|
|
7bf9c6c8bd | ||
|
|
2bfa0e0239 | ||
|
|
24758e8b90 | ||
|
|
88f2e29674 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
- name: Install QEMU static binaries
|
||||
uses: docker/setup-qemu-action@v4
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
uses: arduino/setup-task@v3.0.0
|
||||
- name: Install Dagger
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
|
||||
|
||||
2
.github/workflows/publish-docs.yml
vendored
2
.github/workflows/publish-docs.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
uses: actions/checkout@v7.0.0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
# Use the latest LTS version of Node.js already installed on the runner.
|
||||
node-version: latest
|
||||
|
||||
4
.github/workflows/release-please.yml
vendored
4
.github/workflows/release-please.yml
vendored
@ -21,13 +21,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.0
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
- name: Install QEMU static binaries
|
||||
uses: docker/setup-qemu-action@v4
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
uses: arduino/setup-task@v3.0.0
|
||||
- name: Install Dagger
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
|
||||
|
||||
2
.github/workflows/release-publish.yml
vendored
2
.github/workflows/release-publish.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- name: Install QEMU static binaries
|
||||
uses: docker/setup-qemu-action@v4
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
uses: arduino/setup-task@v3.0.0
|
||||
- name: Install Dagger
|
||||
env:
|
||||
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
|
||||
|
||||
2
go.mod
2
go.mod
@ -14,7 +14,7 @@ require (
|
||||
github.com/onsi/gomega v1.42.1
|
||||
github.com/spf13/cobra v1.10.2
|
||||
github.com/spf13/viper v1.21.0
|
||||
google.golang.org/grpc v1.82.0
|
||||
google.golang.org/grpc v1.82.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.36.2
|
||||
k8s.io/apiextensions-apiserver v0.36.2
|
||||
|
||||
4
go.sum
4
go.sum
@ -293,8 +293,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 h1:
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478/go.mod h1:C6ADNqOxbgdUUeRTU+LCHDPB9ttAMCTff6auwCVa4uc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad h1:45WmJvIV6C2+O/jjLkPUH+F3aOj/1miDoU2DD0+NWbg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
|
||||
google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
|
||||
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI=
|
||||
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@ -33,6 +33,7 @@ import (
|
||||
|
||||
internalClient "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/client"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/deployment"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/diagnostics"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/e2etestenv"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/kustomize"
|
||||
|
||||
@ -131,6 +132,28 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte {
|
||||
logFlags.ConfigureLogging()
|
||||
})
|
||||
|
||||
// The ephemeral cluster the suite runs against is torn down right after this
|
||||
// process exits, so this is the only chance to capture the CloudNativePG
|
||||
// operator and barman-cloud plugin logs for a failed run.
|
||||
var _ = ReportAfterSuite("dump cnpg-system diagnostics on failure", func(report Report) {
|
||||
if report.SuiteSucceeded {
|
||||
return
|
||||
}
|
||||
|
||||
cl, _, err := internalClient.NewClient()
|
||||
if err != nil {
|
||||
_, _ = fmt.Fprintf(GinkgoWriter, "failed to create Kubernetes client for diagnostics: %v\n", err)
|
||||
return
|
||||
}
|
||||
clientSet, _, err := internalClient.NewClientSet()
|
||||
if err != nil {
|
||||
_, _ = fmt.Fprintf(GinkgoWriter, "failed to create Kubernetes clientset for diagnostics: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
diagnostics.DumpOperatorNamespace(context.Background(), cl, clientSet, "cnpg-system")
|
||||
})
|
||||
|
||||
// Run e2e tests using the Ginkgo runner.
|
||||
func TestE2E(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
|
||||
209
test/e2e/internal/diagnostics/diagnostics.go
Normal file
209
test/e2e/internal/diagnostics/diagnostics.go
Normal file
@ -0,0 +1,209 @@
|
||||
/*
|
||||
Copyright © contributors to CloudNativePG, established as
|
||||
CloudNativePG a Series of LF Projects, LLC.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Package diagnostics provides helpers to capture the state of a namespace
|
||||
// when an e2e spec fails, so the root cause can be inspected from the CI
|
||||
// logs without needing to reproduce the failure locally.
|
||||
package diagnostics
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"slices"
|
||||
"sort"
|
||||
|
||||
cloudnativepgv1 "github.com/cloudnative-pg/api/pkg/api/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
)
|
||||
|
||||
// pluginContainerName is the name of the barman-cloud plugin sidecar injected
|
||||
// into every PostgreSQL pod, see internal/cnpgi/operator/lifecycle.go.
|
||||
const pluginContainerName = "plugin-barman-cloud"
|
||||
|
||||
// tailLines is the number of trailing log lines fetched from each container.
|
||||
const tailLines = 200
|
||||
|
||||
// DumpNamespace prints diagnostic information about the given test namespace
|
||||
// to the GinkgoWriter: namespace Events, Backup and Cluster statuses, pod
|
||||
// container statuses, and the tail of the postgres/plugin container logs.
|
||||
// It is a no-op if the current spec has not failed, so it is safe to call
|
||||
// unconditionally from an AfterEach, before the namespace is torn down.
|
||||
func DumpNamespace(ctx context.Context, cl client.Client, clientSet *kubernetes.Clientset, namespaceName string) {
|
||||
if !CurrentSpecReport().Failed() {
|
||||
return
|
||||
}
|
||||
|
||||
dumpNamespace(ctx, cl, clientSet, namespaceName, "postgres", pluginContainerName)
|
||||
}
|
||||
|
||||
// DumpOperatorNamespace prints the same diagnostics as DumpNamespace, but for
|
||||
// the cnpg-system namespace the CloudNativePG operator and the barman-cloud
|
||||
// plugin run in, dumping the logs of every container in it. Unlike
|
||||
// DumpNamespace it always runs when called: the caller (typically a
|
||||
// ReportAfterSuite, since cnpg-system isn't torn down per-spec) is expected
|
||||
// to only call it once the aggregated suite report shows a failure.
|
||||
func DumpOperatorNamespace(
|
||||
ctx context.Context,
|
||||
cl client.Client,
|
||||
clientSet *kubernetes.Clientset,
|
||||
namespaceName string,
|
||||
) {
|
||||
dumpNamespace(ctx, cl, clientSet, namespaceName)
|
||||
}
|
||||
|
||||
func dumpNamespace(
|
||||
ctx context.Context,
|
||||
cl client.Client,
|
||||
clientSet *kubernetes.Clientset,
|
||||
namespaceName string,
|
||||
containerNames ...string,
|
||||
) {
|
||||
fmt.Fprintf(GinkgoWriter, "\n::group::Diagnostics for namespace %q\n", namespaceName)
|
||||
defer fmt.Fprintln(GinkgoWriter, "::endgroup::")
|
||||
|
||||
dumpEvents(ctx, cl, namespaceName)
|
||||
dumpBackups(ctx, cl, namespaceName)
|
||||
dumpClusters(ctx, cl, namespaceName)
|
||||
dumpPods(ctx, cl, clientSet, namespaceName, containerNames)
|
||||
}
|
||||
|
||||
func dumpEvents(ctx context.Context, cl client.Client, namespaceName string) {
|
||||
var events corev1.EventList
|
||||
if err := cl.List(ctx, &events, client.InNamespace(namespaceName)); err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, "failed to list events in %q: %v\n", namespaceName, err)
|
||||
return
|
||||
}
|
||||
|
||||
sort.Slice(events.Items, func(i, j int) bool {
|
||||
return events.Items[i].LastTimestamp.Before(&events.Items[j].LastTimestamp)
|
||||
})
|
||||
|
||||
fmt.Fprintf(GinkgoWriter, "-- Events (%d) --\n", len(events.Items))
|
||||
for _, event := range events.Items {
|
||||
fmt.Fprintf(GinkgoWriter, "[%s] %s/%s %s: %s\n",
|
||||
event.LastTimestamp.Format("15:04:05"),
|
||||
event.InvolvedObject.Kind, event.InvolvedObject.Name,
|
||||
event.Reason, event.Message)
|
||||
}
|
||||
}
|
||||
|
||||
func dumpBackups(ctx context.Context, cl client.Client, namespaceName string) {
|
||||
var backups cloudnativepgv1.BackupList
|
||||
if err := cl.List(ctx, &backups, client.InNamespace(namespaceName)); err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, "failed to list backups in %q: %v\n", namespaceName, err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintf(GinkgoWriter, "-- Backups (%d) --\n", len(backups.Items))
|
||||
for _, backup := range backups.Items {
|
||||
fmt.Fprintf(GinkgoWriter, "%s: phase=%s error=%q commandError=%q\n",
|
||||
backup.Name, backup.Status.Phase, backup.Status.Error, backup.Status.CommandError)
|
||||
}
|
||||
}
|
||||
|
||||
func dumpClusters(ctx context.Context, cl client.Client, namespaceName string) {
|
||||
var clusters cloudnativepgv1.ClusterList
|
||||
if err := cl.List(ctx, &clusters, client.InNamespace(namespaceName)); err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, "failed to list clusters in %q: %v\n", namespaceName, err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintf(GinkgoWriter, "-- Clusters (%d) --\n", len(clusters.Items))
|
||||
for _, cluster := range clusters.Items {
|
||||
fmt.Fprintf(GinkgoWriter, "%s: phase=%s reason=%q readyInstances=%d/%d\n",
|
||||
cluster.Name, cluster.Status.Phase, cluster.Status.PhaseReason,
|
||||
cluster.Status.ReadyInstances, cluster.Spec.Instances)
|
||||
}
|
||||
}
|
||||
|
||||
// dumpPods prints every pod's container statuses in namespaceName, and the
|
||||
// tail of the log of each container whose name is in containerNames (or
|
||||
// every container, if containerNames is empty).
|
||||
func dumpPods(
|
||||
ctx context.Context,
|
||||
cl client.Client,
|
||||
clientSet *kubernetes.Clientset,
|
||||
namespaceName string,
|
||||
containerNames []string,
|
||||
) {
|
||||
var pods corev1.PodList
|
||||
if err := cl.List(ctx, &pods, client.InNamespace(namespaceName)); err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, "failed to list pods in %q: %v\n", namespaceName, err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintf(GinkgoWriter, "-- Pods (%d) --\n", len(pods.Items))
|
||||
for _, pod := range pods.Items {
|
||||
fmt.Fprintf(GinkgoWriter, "%s: phase=%s\n", pod.Name, pod.Status.Phase)
|
||||
for _, cs := range pod.Status.ContainerStatuses {
|
||||
fmt.Fprintf(GinkgoWriter, " container %s: ready=%t restarts=%d state=%s\n",
|
||||
cs.Name, cs.Ready, cs.RestartCount, containerStateString(cs.State))
|
||||
|
||||
if len(containerNames) == 0 || slices.Contains(containerNames, cs.Name) {
|
||||
dumpContainerLog(ctx, clientSet, namespaceName, pod.Name, cs.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func containerStateString(state corev1.ContainerState) string {
|
||||
switch {
|
||||
case state.Waiting != nil:
|
||||
return fmt.Sprintf("waiting(%s: %s)", state.Waiting.Reason, state.Waiting.Message)
|
||||
case state.Running != nil:
|
||||
return fmt.Sprintf("running(since %s)", state.Running.StartedAt)
|
||||
case state.Terminated != nil:
|
||||
return fmt.Sprintf("terminated(exitCode=%d reason=%s: %s)",
|
||||
state.Terminated.ExitCode, state.Terminated.Reason, state.Terminated.Message)
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
func dumpContainerLog(
|
||||
ctx context.Context,
|
||||
clientSet *kubernetes.Clientset,
|
||||
namespaceName, podName, containerName string,
|
||||
) {
|
||||
tail := int64(tailLines)
|
||||
req := clientSet.CoreV1().Pods(namespaceName).GetLogs(podName, &corev1.PodLogOptions{
|
||||
Container: containerName,
|
||||
TailLines: &tail,
|
||||
})
|
||||
|
||||
stream, err := req.Stream(ctx)
|
||||
if err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, " failed to fetch logs for %s/%s: %v\n", podName, containerName, err)
|
||||
return
|
||||
}
|
||||
defer stream.Close()
|
||||
|
||||
logs, err := io.ReadAll(stream)
|
||||
if err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, " failed to read logs for %s/%s: %v\n", podName, containerName, err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintf(GinkgoWriter, " -- last %d lines of %s/%s --\n%s\n", tailLines, podName, containerName, logs)
|
||||
}
|
||||
@ -72,8 +72,8 @@ func newAzuriteDeployment(namespace, name string) *appsv1.Deployment {
|
||||
{
|
||||
Name: name,
|
||||
// renovate: datasource=docker depName=mcr.microsoft.com/azure-storage/azurite versioning=docker
|
||||
// Version: 3.35.0
|
||||
Image: "mcr.microsoft.com/azure-storage/azurite@sha256:647c63a91102a9d8e8000aab803436e1fc85fbb285e7ce830a82ee5d6661cf37",
|
||||
// Version: 3.36.0
|
||||
Image: "mcr.microsoft.com/azure-storage/azurite@sha256:37493d0f2e764467421ffe16eb3caa39277e5fa7f6adea18eb5bbfb3c5247f98",
|
||||
Args: []string{
|
||||
"azurite-blob",
|
||||
"--blobHost",
|
||||
|
||||
@ -26,11 +26,13 @@ import (
|
||||
v1 "github.com/cloudnative-pg/api/pkg/api/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
internalClient "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/client"
|
||||
internalCluster "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/cluster"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/command"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/diagnostics"
|
||||
nmsp "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/namespace"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@ -40,14 +42,18 @@ import (
|
||||
var _ = Describe("Backup and restore", func() {
|
||||
var namespace *corev1.Namespace
|
||||
var cl client.Client
|
||||
var diagClientSet *kubernetes.Clientset
|
||||
BeforeEach(func(ctx SpecContext) {
|
||||
var err error
|
||||
cl, _, err = internalClient.NewClient()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
diagClientSet, _, err = internalClient.NewClientSet()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
namespace, err = nmsp.CreateUniqueNamespace(ctx, cl, "backup-restore")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
AfterEach(func(ctx SpecContext) {
|
||||
diagnostics.DumpNamespace(ctx, cl, diagClientSet, namespace.Name)
|
||||
Expect(cl.Delete(ctx, namespace)).To(Succeed())
|
||||
})
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ import (
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/utils/ptr"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
@ -34,6 +35,7 @@ import (
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/operator/specs"
|
||||
internalClient "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/client"
|
||||
internalCluster "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/cluster"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/diagnostics"
|
||||
nmsp "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/namespace"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/objectstore"
|
||||
|
||||
@ -51,16 +53,20 @@ const (
|
||||
var _ = Describe("Credential rotation", func() {
|
||||
var namespace *corev1.Namespace
|
||||
var cl client.Client
|
||||
var diagClientSet *kubernetes.Clientset
|
||||
|
||||
BeforeEach(func(ctx SpecContext) {
|
||||
var err error
|
||||
cl, _, err = internalClient.NewClient()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
diagClientSet, _, err = internalClient.NewClientSet()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
namespace, err = nmsp.CreateUniqueNamespace(ctx, cl, "cred-rotation")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterEach(func(ctx SpecContext) {
|
||||
diagnostics.DumpNamespace(ctx, cl, diagClientSet, namespace.Name)
|
||||
Expect(cl.Delete(ctx, namespace)).To(Succeed())
|
||||
})
|
||||
|
||||
|
||||
@ -27,12 +27,14 @@ import (
|
||||
cloudnativepgv1 "github.com/cloudnative-pg/api/pkg/api/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/utils/ptr"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
internalClient "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/client"
|
||||
cluster2 "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/cluster"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/command"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/diagnostics"
|
||||
nmsp "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/namespace"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@ -42,14 +44,18 @@ import (
|
||||
var _ = Describe("Replica cluster", func() {
|
||||
var namespace *corev1.Namespace
|
||||
var cl client.Client
|
||||
var diagClientSet *kubernetes.Clientset
|
||||
BeforeEach(func(ctx SpecContext) {
|
||||
var err error
|
||||
cl, _, err = internalClient.NewClient()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
diagClientSet, _, err = internalClient.NewClientSet()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
namespace, err = nmsp.CreateUniqueNamespace(ctx, cl, "replica-cluster")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
AfterEach(func(ctx SpecContext) {
|
||||
diagnostics.DumpNamespace(ctx, cl, diagClientSet, namespace.Name)
|
||||
Expect(cl.Delete(ctx, namespace)).To(Succeed())
|
||||
})
|
||||
DescribeTable("can switchover to a replica cluster",
|
||||
|
||||
@ -121,8 +121,8 @@ func newS3ClientDeployment(namespace string) *appsv1.Deployment {
|
||||
{
|
||||
Name: s3ClientName,
|
||||
// renovate: datasource=docker depName=amazon/aws-cli versioning=docker
|
||||
// Version: 2.35.11
|
||||
Image: "docker.io/amazon/aws-cli@sha256:749bfaf91d690b9a1768083822d620f96c19defdf9ca2dc227eb3695281fda5b",
|
||||
// Version: 2.35.24
|
||||
Image: "docker.io/amazon/aws-cli@sha256:f7e6c7fb03510fd1f4e27469458ca372a37c823a8c32860e0dd2f04a41787794",
|
||||
Command: []string{"sleep", "infinity"},
|
||||
Env: []corev1.EnvVar{
|
||||
{
|
||||
|
||||
@ -38,6 +38,7 @@ import (
|
||||
internalCluster "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/cluster"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/command"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/deployment"
|
||||
"github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/diagnostics"
|
||||
nmsp "github.com/cloudnative-pg/plugin-barman-cloud/test/e2e/internal/namespace"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@ -128,6 +129,7 @@ var _ = Describe("Parallel WAL restore", func() {
|
||||
})
|
||||
|
||||
AfterEach(func(ctx SpecContext) {
|
||||
diagnostics.DumpNamespace(ctx, cl, clientSet, namespace.Name)
|
||||
Expect(cl.Delete(ctx, namespace)).To(Succeed())
|
||||
})
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.10.1",
|
||||
"@docusaurus/preset-classic": "3.10.1",
|
||||
"@docusaurus/core": "3.10.2",
|
||||
"@docusaurus/preset-classic": "3.10.2",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.55.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
@ -25,10 +25,10 @@
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.10.1",
|
||||
"@docusaurus/tsconfig": "3.10.1",
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"typescript": "~6.0.0"
|
||||
"@docusaurus/module-type-aliases": "3.10.2",
|
||||
"@docusaurus/tsconfig": "3.10.2",
|
||||
"@docusaurus/types": "3.10.2",
|
||||
"typescript": "~7.0.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
||||
1296
web/yarn.lock
1296
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user