1. remove aws case

2. update travis method
This commit is contained in:
Freddy Tan 2016-11-18 17:08:10 +08:00
parent bf9bd75e25
commit 7b9a0491ca
3 changed files with 5 additions and 18 deletions

View file

@ -16,7 +16,9 @@ before_script:
- 'unzip terraform_0.7.11_linux_amd64.zip -d terraform' - 'unzip terraform_0.7.11_linux_amd64.zip -d terraform'
- 'sudo ln -s $PWD/terraform/terraform /usr/local/terraform' - 'sudo ln -s $PWD/terraform/terraform /usr/local/terraform'
install: "pip install -r test/requirements.txt" install:
- "pip install -r test/requirements.txt"
- "pip install ."
# command to run tests # command to run tests
script: script:
- cd test - cd test

View file

@ -1,13 +0,0 @@
variable "access_key" {}
variable "secret_key" {}
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "us-west-2"
}
resource "aws_instance" "ubuntu-1404" {
ami = "ami-9abea4fb"
instance_type = "t2.micro"
}

View file

@ -6,8 +6,6 @@ import re
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
ACCESS_KEY = os.environ['PACKER_access_key']
SECRET_KEY = os.environ['PACKER_secret_key']
STRING_CASES = [ STRING_CASES = [
[ [
@ -29,8 +27,8 @@ CMD_CASES = [
['method', 'expected_output'], ['method', 'expected_output'],
[ [
[ [
lambda x: x.cmd('plan', 'aws_tf', no_color='', var={'access_key': ACCESS_KEY, 'secret_key': SECRET_KEY}) , lambda x: x.cmd('plan', 'apply_tf', no_color='', var={'test_var': 'test'}) ,
'Plan: 1 to add, 0 to change, 0 to destroy' "doesn't need to do anything"
] ]
] ]
] ]