mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Added TESTOPTIONS and set sync to debug level.
This commit is contained in:
parent
efaf29899b
commit
7de70c4e13
3 changed files with 14 additions and 6 deletions
6
Makefile
6
Makefile
|
@ -484,6 +484,10 @@ endif
|
|||
ifndef ARANGODIMAGE
|
||||
@echo ARANGODIMAGE must point to the usable arangodb enterprise image
|
||||
@exit 1
|
||||
endif
|
||||
ifndef ENTERPRISELICENSE
|
||||
@echo For tests using ArangoSync you most likely need the license key. Please set ENTERPRISELICENSE.
|
||||
@exit 1
|
||||
endif
|
||||
@echo Using ArangoSync source at $(ARANGOSYNCSRCDIR)
|
||||
@echo Using ArangoDB image $(ARANGODIMAGE)
|
||||
|
@ -503,4 +507,4 @@ ifdef PUSHIMAGES
|
|||
docker push $(ARANGOSYNCTESTIMAGE)
|
||||
docker push $(ARANGOSYNCIMAGE)
|
||||
endif
|
||||
$(ROOTDIR)/scripts/kube_run_sync_tests.sh $(DEPLOYMENTNAMESPACE) '$(ARANGODIMAGE)' '$(ARANGOSYNCIMAGE)' '$(ARANGOSYNCTESTIMAGE)' '$(ARANGOSYNCTESTCTRLIMAGE)'
|
||||
$(ROOTDIR)/scripts/kube_run_sync_tests.sh $(DEPLOYMENTNAMESPACE) '$(ARANGODIMAGE)' '$(ARANGOSYNCIMAGE)' '$(ARANGOSYNCTESTIMAGE)' '$(ARANGOSYNCTESTCTRLIMAGE)' '$(TESTOPTIONS)'
|
|
@ -7,6 +7,7 @@ ARANGODIMAGE=$2
|
|||
ARANGOSYNCIMAGE=$3
|
||||
ARANOSYNCTESTIMAGE=$4
|
||||
ARANOSYNCTESTCTRLIMAGE=$5
|
||||
TESTARGS=$6
|
||||
|
||||
ARANGOSYNCIMAGEID=$(docker inspect ${ARANGOSYNCIMAGE} '--format={{index .RepoDigests 0}}')
|
||||
ARANOSYNCTESTIMAGEID=$(docker inspect ${ARANOSYNCTESTIMAGE} '--format={{index .RepoDigests 0}}')
|
||||
|
@ -20,4 +21,5 @@ kubectl --namespace ${DEPLOYMENTNAMESPACE} \
|
|||
--arango-sync-image=${ARANGOSYNCIMAGEID} \
|
||||
--arango-sync-test-image=${ARANOSYNCTESTIMAGEID} \
|
||||
--license-key-secret-name=arangodb-jenkins-license-key \
|
||||
--namespace=${DEPLOYMENTNAMESPACE}
|
||||
--namespace=${DEPLOYMENTNAMESPACE} \
|
||||
--test-args="${TESTARGS}"
|
|
@ -34,6 +34,7 @@ var (
|
|||
arangoSyncImage string
|
||||
licenseKeySecretName string
|
||||
namespace string
|
||||
additionalTestArgs string
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -50,6 +51,7 @@ func init() {
|
|||
flag.StringVar(&arangoSyncImage, "arango-sync-image", "", "ArangoSync Image used for testing")
|
||||
flag.StringVar(&licenseKeySecretName, "license-key-secret-name", "arangodb-license-key", "Secret name of the license key used for the deployments")
|
||||
flag.StringVar(&namespace, "namespace", "default", "Testing namespace")
|
||||
flag.StringVar(&additionalTestArgs, "test-args", "", "Additional parameters passed to the test executable")
|
||||
}
|
||||
|
||||
func newDeployment(ns, name string) *dapi.ArangoDeployment {
|
||||
|
@ -86,6 +88,9 @@ func newSyncDeployment(ns, name string, accessPackage bool) *dapi.ArangoDeployme
|
|||
},
|
||||
}
|
||||
|
||||
d.Spec.SyncMasters.Args = append(d.Spec.SyncMasters.Args, "--log.level=debug")
|
||||
d.Spec.SyncWorkers.Args = append(d.Spec.SyncWorkers.Args, "--log.level=debug")
|
||||
|
||||
if accessPackage {
|
||||
d.Spec.Sync.ExternalAccess.AccessPackageSecretNames = []string{accessPackageSecretName}
|
||||
}
|
||||
|
@ -141,18 +146,15 @@ func waitForSyncDeploymentReady(ctx context.Context, ns, name string, kubecli ku
|
|||
|
||||
sc, err := mustNewArangoDBSyncClient(ctx, kubecli, deployment)
|
||||
if err != nil {
|
||||
log.Printf("failed to create sync client: %s", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
info, err := sc.Master().Status(ctx)
|
||||
if err != nil {
|
||||
log.Printf("failed to fetch status: %s", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
if info.Status != sync.SyncStatusRunning {
|
||||
log.Printf("SyncStatus not running: %s", info.Status)
|
||||
return fmt.Errorf("SyncStatus not running: %s", info.Status)
|
||||
}
|
||||
|
||||
|
@ -296,7 +298,7 @@ func createArangoSyncTestPod(ns, name string) *corev1.Pod {
|
|||
Name: "tests",
|
||||
Image: arangoSyncTestImage,
|
||||
ImagePullPolicy: corev1.PullAlways,
|
||||
Args: []string{"-test.v"},
|
||||
Args: []string{"-test.v", additionalTestArgs},
|
||||
Env: []corev1.EnvVar{
|
||||
corev1.EnvVar{
|
||||
Name: "MASTERAENDPOINTS",
|
||||
|
|
Loading…
Reference in a new issue