coherence-operator

Running the samples integration tests

Prerequisites

Please ensure that you have met all the prerequisites as described in the Samples Readme.

Run the tests

  1. Create the test namespace

    export CI_BUILD_ID=test
    export NS=test-sample-${CI_BUILD_ID}
    
    kubectl create namespace $NS
    
  2. Create the secrets

    kubectl create secret docker-registry coherence-k8s-operator-development-secret \
         --namespace $NS \
         --docker-server=your-docker-server \
         --docker-username=your-docker-username \
         --docker-password='your-docker-password'
            
    kubectl create secret docker-registry sample-coherence-secret \
         --namespace $NS \
         --docker-server=your-docker-server \
         --docker-username=your-docker-username \
         --docker-password='your-docker-password'   
    

    Note: You must have push permissions for this repository if you not running Kubernetes locally.

  3. Run the tests

    cd docs/samples
    mvn -Dcoherence.image.prefix=store/oracle/ -Dk8s.chart.test.versions=0.9.4 \
        -Dk8s.namespace=$NS -Dk8s.create.namespace=false -P docker,helm-test clean verify
    

    Note: If you are running against a remote Kubernetes cluster, you must also specify the profile dockerPush

    Note: You can also specify multiple versions of the chart to test: e.g. -Dk8s.chart.test.versions=0.9.4,1.0.0.

    Note: You can set the operator.helm.chart.package and coherence.helm.chart.package properties to run against operator charts that have been built on disk.