Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration tests #29

Closed
jdoshi1 opened this issue Jul 25, 2018 · 2 comments
Closed

Fix integration tests #29

jdoshi1 opened this issue Jul 25, 2018 · 2 comments

Comments

@jdoshi1
Copy link
Contributor

jdoshi1 commented Jul 25, 2018

Integration tests are broken. The following is the console log of itest execution on travis-ci:

image

This error can be fixed by updating the docker-compose.yml file with the following:

version: '2'
services:
    dockerfile-image-update:
        # This has to point to the target registry and be the component name that the pipeline spits out
        env_file:
            # This tool gets external endpoints from environment variables. We store external endpoints in this file.
            - ./dockerfile-image-update-itest/itest.env
            # We recommend a separate secret file containing git_api_token.
            # export user_itest_secrets_file_secret=/path/to/secretFile in your shell
            # For CI purposes, the secret file can be added to Jenkins Credential Store with the id user_itest_secrets_file
            - ${user_itest_secrets_file_secret}
        image: salesforce/dockerfile-image-update
        volumes:
            # This allows us to get our test results back to workspace for the pipeline to pick up
            - ./test-results:/tmp/test-results
            # Place integration test into the component so that we don't have to ship integration tests inside the component
            - ./dockerfile-image-update-itest/target:/tmp
            # If you have a secret file, you can volume mount the file to gain access to it
            # export user_itest_secrets_file_secret=/path/to/secretFile in shell
            # For CI purposes, the secret file can be added to Jenkins Credential Store with the id user_itest_secrets_file
            #- ${user_itest_secrets_file_secret}:/tmp/secretFile
        # Override the default command, because we will invoke the command within the integration test
        entrypoint:
            - java
            - -jar
            - /tmp/dockerfile-image-update-itest-1.0-SNAPSHOT.jar

But then the TestNG TestStarter fails with the following error:

docker-compose up
Recreating dockerfile-image-update_dockerfile-image-update_1 ... done
Attaching to dockerfile-image-update_dockerfile-image-update_1
dockerfile-image-update_1  | 
dockerfile-image-update_1  | ===============================================
dockerfile-image-update_1  | Command line suite
dockerfile-image-update_1  | Total tests run: 10, Failures: 0, Skips: 10
dockerfile-image-update_1  | Configuration Failures: 3, Skips: 3
dockerfile-image-update_1  | ===============================================
dockerfile-image-update_1  | 
dockerfile-image-update_1  | 17:53:28.716 [main] [ERROR] com.salesforce.dockerfileimageupdate.itest.TestStarter - Test(s) have failed see output above

TestNG setup configuration needs to be fixed...

@afalko
Copy link
Collaborator

afalko commented Jul 26, 2018

@jdoshi1 I fixed this in #9 , let me know if that branch works for you.

@justinharringa
Copy link
Contributor

Closing as this appears to have been fixed in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants