Skip to content

Commit

Permalink
fix main branch testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktavious committed Oct 3, 2023
1 parent 8b13b8c commit 3cd168e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 47 deletions.
24 changes: 12 additions & 12 deletions check_has_owner.go
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package opslevel

type ServiceOwnershipCheckFragment struct {
RequireContactMethod *bool `graphql:"requireContactMethod"`
ContactMethod *ServiceOwnershipCheckContactType `graphql:"contactMethod"`
TeamTagKey string `graphql:"tagKey"`
TeamTagPredicate *Predicate `graphql:"tagPredicate"`
RequireContactMethod *bool `graphql:"requireContactMethod"`
ContactMethod *ContactType `graphql:"contactMethod"`
TeamTagKey string `graphql:"tagKey"`
TeamTagPredicate *Predicate `graphql:"tagPredicate"`
}

type CheckServiceOwnershipCreateInput struct {
CheckCreateInput

RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateInput `json:"tagPredicate,omitempty"`
RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateInput `json:"tagPredicate,omitempty"`
}

type CheckServiceOwnershipUpdateInput struct {
CheckUpdateInput

RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty"`
RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty"`
}

func (client *Client) CreateCheckServiceOwnership(input CheckServiceOwnershipCreateInput) (*Check, error) {
Expand Down
4 changes: 2 additions & 2 deletions check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ var testcases = map[string]struct {
"CreateServiceOwnership": {
fixture: "check/create_service_ownership",
body: func(c *ol.Client) (*ol.Check, error) {
slackType := ol.ServiceOwnershipCheckContactTypeSlack
slackType := ol.ContactTypeSlack
return c.CreateCheckServiceOwnership(ol.CheckServiceOwnershipCreateInput{
CheckCreateInput: checkCreateInput,
RequireContactMethod: ol.Bool(true),
Expand All @@ -337,7 +337,7 @@ var testcases = map[string]struct {
"UpdateServiceOwnership": {
fixture: "check/update_service_ownership",
body: func(c *ol.Client) (*ol.Check, error) {
emailType := ol.ServiceOwnershipCheckContactTypeEmail
emailType := ol.ContactTypeEmail
return c.UpdateCheckServiceOwnership(ol.CheckServiceOwnershipUpdateInput{
CheckUpdateInput: checkUpdateInput,
RequireContactMethod: ol.Bool(true),
Expand Down
5 changes: 3 additions & 2 deletions clientGQL.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package opslevel
import (
"context"
"fmt"
"github.com/hashicorp/go-retryablehttp"
"github.com/hasura/go-graphql-client"
"net/http"
"strings"

"github.com/hashicorp/go-retryablehttp"
"github.com/hasura/go-graphql-client"
)

type Client struct {
Expand Down
29 changes: 6 additions & 23 deletions enum.go

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

8 changes: 4 additions & 4 deletions infra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ func TestGetInfrastructureResourceTags(t *testing.T) {
// Arrange
requests := []TestRequest{
{
`{"query": "query InfrastructureResourceTags($after:String!$first:Int!$infrastructureResource:IdentifierInput!){account{infrastructureResource(input: $infrastructureResource){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
Request: `{"query": "query InfrastructureResourceTags($after:String!$first:Int!$infrastructureResource:IdentifierInput!){account{infrastructureResource(input: $infrastructureResource){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
"variables": {
{{ template "first_page_variables" }},
"infrastructureResource": {"id": "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRsYWIvMTA5ODc"}
}
}`,
`{
Response: `{
"data": {
"account": {
"infrastructureResource": {
Expand Down Expand Up @@ -287,13 +287,13 @@ func TestGetInfrastructureResourceTags(t *testing.T) {
}`,
},
{
`{"query": "query InfrastructureResourceTags($after:String!$first:Int!$infrastructureResource:IdentifierInput!){account{infrastructureResource(input: $infrastructureResource){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
Request: `{"query": "query InfrastructureResourceTags($after:String!$first:Int!$infrastructureResource:IdentifierInput!){account{infrastructureResource(input: $infrastructureResource){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
"variables": {
{{ template "second_page_variables" }},
"infrastructureResource": {"id": "Z2lkOi8vb3BzbGV2ZWwvUmVwb3NpdG9yaWVzOjpHaXRsYWIvMTA5ODc"}
}
}`,
`{
Response: `{
"data": {
"account": {
"infrastructureResource": {
Expand Down
8 changes: 4 additions & 4 deletions user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ func TestGetUserTags(t *testing.T) {
// Arrange
requests := []TestRequest{
{
`{"query": "query UserTagsList($after:String!$first:Int!$user:ID!){account{user(id: $user){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
Request: `{"query": "query UserTagsList($after:String!$first:Int!$user:ID!){account{user(id: $user){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
"variables": {
{{ template "first_page_variables" }},
"user": "{{ template "id1"}}"
}}`,
`{
Response: `{
"data": {
"account": {
"user": {
Expand Down Expand Up @@ -290,13 +290,13 @@ func TestGetUserTags(t *testing.T) {
}`,
},
{
`{"query": "query UserTagsList($after:String!$first:Int!$user:ID!){account{user(id: $user){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
Request: `{"query": "query UserTagsList($after:String!$first:Int!$user:ID!){account{user(id: $user){tags(after: $after, first: $first){nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}",
"variables": {
{{ template "second_page_variables" }},
"user": "{{ template "id1"}}"
}
}`,
`{
Response: `{
"data": {
"account": {
"user": {
Expand Down

0 comments on commit 3cd168e

Please sign in to comment.