Skip to content

Commit 52164c2

Browse files
authored
Merge pull request #92 from SumoLogic/ssain-update-travis-pr-builder
Ssain update travis pr builder
2 parents 22d4ae2 + 9dc7659 commit 52164c2

12 files changed

+33
-28
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ install:
1717
- bash scripts/gogetcookie.sh
1818

1919
script:
20-
- make testacc
20+
- make test
21+
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/run_on_non_pull_requests; fi'
2122

22-
branches:
23-
only:
24-
- master
2523
matrix:
2624
fast_finish: true
2725
allow_failures:

sumologic/provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestProvider_impl(t *testing.T) {
2828
var _ terraform.ResourceProvider = Provider()
2929
}
3030

31-
func TestAccPreCheck(t *testing.T) {
31+
func testAccPreCheck(t *testing.T) {
3232
if v := os.Getenv("SUMOLOGIC_ACCESSKEY"); v == "" {
3333
t.Fatal("SUMOLOGIC_ACCESSKEY must be set for acceptance tests")
3434
}

sumologic/resource_sumologic_content_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestAccContentCreate(t *testing.T) {
1717
personalContentId := os.Getenv("SUMOLOGIC_PF")
1818

1919
resource.Test(t, resource.TestCase{
20-
PreCheck: func() { TestAccPreCheck(t) },
20+
PreCheck: func() { testAccPreCheck(t) },
2121
Providers: testAccProviders,
2222
CheckDestroy: testAccCheckContentDestroy(content),
2323
Steps: []resource.TestStep{
@@ -39,7 +39,7 @@ func TestAccContentUpdate(t *testing.T) {
3939
personalContentId := os.Getenv("SUMOLOGIC_PF")
4040

4141
resource.Test(t, resource.TestCase{
42-
PreCheck: func() { TestAccPreCheck(t) },
42+
PreCheck: func() { testAccPreCheck(t) },
4343
Providers: testAccProviders,
4444
CheckDestroy: testAccCheckContentDestroy(content),
4545
Steps: []resource.TestStep{

sumologic/resource_sumologic_extraction_rule_import_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ package sumologic
1313

1414
import (
1515
"fmt"
16-
"github.com/hashicorp/terraform/helper/resource"
1716
"strconv"
1817
"testing"
18+
19+
"github.com/hashicorp/terraform/helper/resource"
1920
)
2021

2122
func TestSumologicFieldExtractionRule_import(t *testing.T) {
@@ -26,7 +27,7 @@ func TestSumologicFieldExtractionRule_import(t *testing.T) {
2627
testEnabled, _ := strconv.ParseBool(FieldsMap["FieldExtractionRule"]["enabled"])
2728

2829
resource.Test(t, resource.TestCase{
29-
PreCheck: func() { TestAccPreCheck(t) },
30+
PreCheck: func() { testAccPreCheck(t) },
3031
Providers: testAccProviders,
3132
CheckDestroy: testAccCheckFieldExtractionRuleDestroy(fieldextractionrule),
3233
Steps: []resource.TestStep{

sumologic/resource_sumologic_extraction_rule_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ package sumologic
1313

1414
import (
1515
"fmt"
16-
"github.com/hashicorp/terraform/helper/resource"
17-
"github.com/hashicorp/terraform/terraform"
1816
"strconv"
1917
"strings"
2018
"testing"
19+
20+
"github.com/hashicorp/terraform/helper/resource"
21+
"github.com/hashicorp/terraform/terraform"
2122
)
2223

2324
func TestAccFieldExtractionRuleCreate(t *testing.T) {
@@ -27,7 +28,7 @@ func TestAccFieldExtractionRuleCreate(t *testing.T) {
2728
testParseExpression := FieldsMap["FieldExtractionRule"]["parseExpression"]
2829
testEnabled, _ := strconv.ParseBool(FieldsMap["FieldExtractionRule"]["enabled"])
2930
resource.Test(t, resource.TestCase{
30-
PreCheck: func() { TestAccPreCheck(t) },
31+
PreCheck: func() { testAccPreCheck(t) },
3132
Providers: testAccProviders,
3233
CheckDestroy: testAccCheckFieldExtractionRuleDestroy(fieldextractionrule),
3334
Steps: []resource.TestStep{
@@ -100,7 +101,7 @@ func TestAccFieldExtractionRuleUpdate(t *testing.T) {
100101
testUpdatedEnabled, _ := strconv.ParseBool(FieldsMap["FieldExtractionRule"]["updatedEnabled"])
101102

102103
resource.Test(t, resource.TestCase{
103-
PreCheck: func() { TestAccPreCheck(t) },
104+
PreCheck: func() { testAccPreCheck(t) },
104105
Providers: testAccProviders,
105106
CheckDestroy: testAccCheckFieldExtractionRuleDestroy(fieldextractionrule),
106107
Steps: []resource.TestStep{

sumologic/resource_sumologic_folder_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccFolderCreate(t *testing.T) {
1616
personalFolderId := os.Getenv("SUMOLOGIC_PF")
1717

1818
resource.Test(t, resource.TestCase{
19-
PreCheck: func() { TestAccPreCheck(t) },
19+
PreCheck: func() { testAccPreCheck(t) },
2020
Providers: testAccProviders,
2121
CheckDestroy: testAccCheckFolderDestroy(folder),
2222
Steps: []resource.TestStep{
@@ -40,7 +40,7 @@ func TestAccFolderUpdate(t *testing.T) {
4040
personalFolderId := os.Getenv("SUMOLOGIC_PF")
4141

4242
resource.Test(t, resource.TestCase{
43-
PreCheck: func() { TestAccPreCheck(t) },
43+
PreCheck: func() { testAccPreCheck(t) },
4444
Providers: testAccProviders,
4545
CheckDestroy: testAccCheckFolderDestroy(folder),
4646
Steps: []resource.TestStep{

sumologic/resource_sumologic_partition_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func TestAccSumoLogicPartition(t *testing.T) {
1313
testName := acctest.RandString(16)
1414
resource.Test(t, resource.TestCase{
15-
PreCheck: func() { TestAccPreCheck(t) },
15+
PreCheck: func() { testAccPreCheck(t) },
1616
Providers: testAccProviders,
1717
CheckDestroy: testAccCheckPartitionDestroy,
1818
Steps: []resource.TestStep{

sumologic/resource_sumologic_role_import_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ package sumologic
1414
import (
1515
"fmt"
1616
//"strconv"
17-
"github.com/hashicorp/terraform/helper/resource"
1817
"testing"
18+
19+
"github.com/hashicorp/terraform/helper/resource"
1920
)
2021

2122
func TestSumologicRole_import(t *testing.T) {
@@ -26,7 +27,7 @@ func TestSumologicRole_import(t *testing.T) {
2627
testCapabilities := []string{"\"" + FieldsMap["Role"]["capabilities"] + "\""}
2728

2829
resource.Test(t, resource.TestCase{
29-
PreCheck: func() { TestAccPreCheck(t) },
30+
PreCheck: func() { testAccPreCheck(t) },
3031
Providers: testAccProviders,
3132
CheckDestroy: testAccCheckRoleDestroy(role),
3233
Steps: []resource.TestStep{

sumologic/resource_sumologic_role_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ package sumologic
1313

1414
import (
1515
"fmt"
16-
"github.com/hashicorp/terraform/helper/resource"
17-
"github.com/hashicorp/terraform/terraform"
1816
"strconv"
1917
"strings"
2018
"testing"
19+
20+
"github.com/hashicorp/terraform/helper/resource"
21+
"github.com/hashicorp/terraform/terraform"
2122
)
2223

2324
func TestAccRoleCreate(t *testing.T) {
@@ -27,7 +28,7 @@ func TestAccRoleCreate(t *testing.T) {
2728
testFilterPredicate := FieldsMap["Role"]["filterPredicate"]
2829
testCapabilities := []string{"\"" + FieldsMap["Role"]["capabilities"] + "\""}
2930
resource.Test(t, resource.TestCase{
30-
PreCheck: func() { TestAccPreCheck(t) },
31+
PreCheck: func() { testAccPreCheck(t) },
3132
Providers: testAccProviders,
3233
CheckDestroy: testAccCheckRoleDestroy(role),
3334
Steps: []resource.TestStep{
@@ -100,7 +101,7 @@ func TestAccRoleUpdate(t *testing.T) {
100101
testUpdatedCapabilities := []string{"\"" + FieldsMap["Role"]["updatedCapabilities"] + "\""}
101102

102103
resource.Test(t, resource.TestCase{
103-
PreCheck: func() { TestAccPreCheck(t) },
104+
PreCheck: func() { testAccPreCheck(t) },
104105
Providers: testAccProviders,
105106
CheckDestroy: testAccCheckRoleDestroy(role),
106107
Steps: []resource.TestStep{

sumologic/resource_sumologic_user_import_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ package sumologic
1313

1414
import (
1515
"fmt"
16-
"github.com/hashicorp/terraform/helper/resource"
1716
"strconv"
1817
"testing"
18+
19+
"github.com/hashicorp/terraform/helper/resource"
1920
)
2021

2122
func TestSumologicUser_import(t *testing.T) {
@@ -27,7 +28,7 @@ func TestSumologicUser_import(t *testing.T) {
2728
testIsActive, _ := strconv.ParseBool(FieldsMap["User"]["isActive"])
2829

2930
resource.Test(t, resource.TestCase{
30-
PreCheck: func() { TestAccPreCheck(t) },
31+
PreCheck: func() { testAccPreCheck(t) },
3132
Providers: testAccProviders,
3233
CheckDestroy: testAccCheckUserDestroy(user),
3334
Steps: []resource.TestStep{

0 commit comments

Comments
 (0)