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 Failing CI Tests #393

Merged
merged 5 commits into from
Mar 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions github/resource_github_team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,23 @@ func testAccCheckGithubTeamDestroy(s *terraform.State) error {
}

team, resp, err := conn.Teams.GetTeamByID(context.TODO(), orgId, id)
if err == nil {
teamId := strconv.FormatInt(*team.ID, 10)
if team != nil && teamId == rs.Primary.ID {
return fmt.Errorf("Team still exists")
if err != nil {
if resp.StatusCode != 404 {
return err
}
}
if resp.StatusCode != 404 {
return err

var teamID string
if team != nil {
teamID = strconv.FormatInt(*team.ID, 10)
}
if teamID == rs.Primary.ID {
return fmt.Errorf("Team still exists")
}

return nil
}

return nil
}

Expand Down
10 changes: 8 additions & 2 deletions github/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ import (
)

const (
ctxEtag = "etag"
ctxId = "id"
ctxEtag = ctxEtagType("etag")
ctxId = ctxIdType("id")
writeDelay = 1 * time.Second
)

// ctxIdType is used to avoid collisions between packages using context
type ctxIdType string

// ctxEtagType is used to avoid collisions between packages using context
type ctxEtagType string

// etagTransport allows saving API quota by passing previously stored Etag
// available via context to request headers
type etagTransport struct {
Expand Down
307 changes: 307 additions & 0 deletions vendor/github.com/apparentlymart/go-textseg/textseg/make_tables.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading