Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sly1029 committed Dec 10, 2024
1 parent 9173a95 commit 2b450d7
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions pkg/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "valid query operation",
request: githubGraphQLRequest{
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
}
}`,
OperationName: "GetRepository",
Expand All @@ -168,9 +168,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "valid query operation no operation name",
request: githubGraphQLRequest{
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
}
}`,
},
Expand All @@ -179,9 +179,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "valid mutation operation",
request: githubGraphQLRequest{
Query: `mutation CreateIssue {
createIssue(input: {repositoryId: "123", title: "title"}) {
issue { id }
Query: `mutation CreateIssue {
createIssue(input: {repositoryId: "123", title: "title"}) {
issue { id }
}
}`,
OperationName: "CreateIssue",
Expand All @@ -191,9 +191,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "operation not in allowlist",
request: githubGraphQLRequest{
Query: `query GetUser {
user(login: "username") {
id
Query: `query GetUser {
user(login: "username") {
id
}
}`,
OperationName: "GetUser",
Expand All @@ -204,9 +204,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "operation type not allowed",
request: githubGraphQLRequest{
Query: `subscription WatchRepository {
repository {
id
Query: `subscription WatchRepository {
repository {
id
}
}`,
OperationName: "WatchRepository",
Expand All @@ -217,9 +217,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "unnamed operation",
request: githubGraphQLRequest{
Query: `query {
repository(owner: "owner", name: "name") {
id
Query: `query {
repository(owner: "owner", name: "name") {
id
}
}`,
},
Expand All @@ -229,9 +229,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "operation name mismatch",
request: githubGraphQLRequest{
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
}
}`,
OperationName: "DifferentName",
Expand All @@ -242,9 +242,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
{
name: "invalid GraphQL syntax",
request: githubGraphQLRequest{
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
`, // Missing closing brace
OperationName: "GetRepository",
},
Expand Down Expand Up @@ -280,9 +280,9 @@ func TestGitHubGraphQLValidation(t *testing.T) {
func TestGitHubGraphQLValidationWithNilFilter(t *testing.T) {
config := &InboundProxyConfig{}
request := githubGraphQLRequest{
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
Query: `query GetRepository {
repository(owner: "owner", name: "name") {
id
}
}`,
OperationName: "GetRepository",
Expand Down

0 comments on commit 2b450d7

Please sign in to comment.