North-Seattle-College / ad440-winter2020-thursday-repo

Repository for AD440 Thursday Class in Winter 2020
Apache License 2.0
10 stars 5 forks source link

Test Travis CI Lambda Function integration #59

Open mattyplo opened 4 years ago

mattyplo commented 4 years ago

test issue #54

kyleo83 commented 4 years ago

Test Objectives Validate that Travis CI responds correctly to different environment conditions, and changes to the branch name for the lambda_deploy and S3_deploy in the .travis.yml file. Test Set-up

  1. Clone repository to local working directory
  2. Create new branch, e.g. feature-sprint2-kyleo in new working directory
  3. Update .travis.yml file, change user feature-sprint2-mattyplo to feature-sprint2-kyleo
  4. Ensure API and UI directories are not in working directory

Push and Verify Steps for each Test

1) Push feature-sprint2-kyleo branch to GitHub 2) Open https://github.com/North-Seattle-College/ad440-winter2020-thursday-repo 3) Click on feature-sprint2-kyleo branch 4) Click on the yellow dot that is at the top of the file list 5) Click details to view the progress of the Travis CI deploy

Tests Test 1. Base test of Travis CI - PASS 1) Run "Push and Verify Steps" Expected: Travis CI will fail because the UI folder with files that Travis CI is searching for does not exist. Actual: Travis CI fails. /home/travis/.travis/functions: line 109: cd: UI/keytrack/: No such file or directory The command "cd UI/keytrack/" failed and exited with 1 during . Your build has been stopped. Link

Test 2. Add UI with required files to working branch, branch = development in S3_deploy - PASS 1) Add UI directory with required files 2) Run "Push and Verify Steps" Expected: Travis CI build is successful but S3 deploy does not occur. Actual: Travis CI build is successful with the following note in the log; Log: Skipping a deployment with the s3 provider because this branch is not permitted: feature-sprint2-kyleo. Link

Test 3. No API folder but kyleo added to travis file if clause, allowing lambda-deploy to run - PASS 1) in line 9 of the file .travis.yml replace mattyplo to kyleo 2) Run "Push and Verify Steps" Expected: Travis CI fails because required API directory files do not exist. Actual: Travis CI fails Log: /home/travis/.travis/functions: line 109: cd: API/travis/: No such file or directory The command "cd API/travis/" failed and exited with 1 during . Link

Test 4. API folder added to working directory - PASS 1) Add API folder with required files to working directory 2) Run "Push and Verify Steps" Expected: Lambdas deploy Actual: Lambdas deploy Log: Preparing deploy Deploying application Link

Test 5. Changed name in .travis.yml back to mattyplo - PASS 1) Change kyleo back to mattyplo in .travis.yml file 2) Run "Push and Verify Steps" Expected: Travis CI passes but lambda_deploy does not run, and S3 deployment is also skipped Actual: Travis CI passes Log: Skipping a deployment with the s3 provider because this branch is not permitted: feature-sprint2-kyleo Link

Test 6. Only updated lambda_deploy entry point in .travis.yml file to kyleo - PASS 1) At about line 9 changes mattyplo to kyleo to allow lambda_deploy code to rum 2) Run "Push and Verify Steps" Expected: Travis CI passes but lambda deployment is skipped Actual: Travis CI passes Log: Skipping a deployment with the lambda provider because this branch is not permitted: feature-sprint2-kyleo Log: Skipping a deployment with the s3 provider because this branch is not permitted: feature-sprint2-kyleo Link

Test 7. Update all branches to feature-sprint2-kyleo PASS 1) Update all instances of mattyplo to kyleo 2) update branches name development to feature-sprint2-kyleo 3) Run "Push and Verify Steps" Expected: Travis CI will fail because no S3 bucket exists for feature-sprint2-kyleo Actual: Travis CI fails Log: /home/travis/.rvm/gems/ruby-2.4.5/gems/aws-sdk-core-2.11.445/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': The specified bucket does not exist (Aws::S3::Errors::NoSuchBucket) Deploy failed Link

Test 8. Create an S3 bucket - PASS 1) Create an S3 bucket named feature-sprint2-kyleo, leave it as private 2) Run "Push and Verify Steps" Expected: Travis CI passes and the lamba and S3 deploys are both successful Actual: Travis CI passes Log: Deploying application Done. Your build exited with 0.

Preparing deploy Deploying application [Link](https://travis-ci.com/North-Seattle-College/ad440-winter2020-thursday-repo/builds/149202717)