Skip to content

Commit

Permalink
test(Pull Request): add Addition/Deletion values instead of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHackman authored and NickHackman committed Dec 10, 2024
1 parent 7ffb8ac commit 9a9bf4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions pkg/github/pull_requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ func TestPullRequestsDataFrame(t *testing.T) {
Repository: Repository{
NameWithOwner: "grafana/github-datasource",
},
Closed: true,
IsDraft: false,
Locked: false,
Merged: true,
Closed: true,
IsDraft: false,
Locked: false,
Merged: true,
Additions: 5,
Deletions: 1,
CreatedAt: githubv4.DateTime{
Time: openedAt,
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/testdata/pull_requests.golden.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: |
// | Type: []int64 | Type: []string | Type: []string | Type: []int64 | Type: []int64 | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []bool | Type: []bool | Type: []bool | Type: []bool | Type: []string | Type: []*time.Time | Type: []*time.Time | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []time.Time | Type: []time.Time | Type: []float64 |
// +---------------+----------------+------------------------------------------------------+-----------------+-----------------+---------------------------+----------------+-------------------+--------------------+--------------------+----------------------+--------------+----------------+--------------+--------------+-----------------+---------------------------------+---------------------------------+----------------------+-----------------------+-----------------------+-------------------------+---------------------------------+---------------------------------+-----------------+
// | 1 | PullRequest #1 | https://github.com/grafana/github-datasource/pulls/1 | 0 | 0 | grafana/github-datasource | OPEN | Test User | testUser | [email protected] | ACME corp | true | false | false | true | MERGEABLE | 2020-08-25 18:01:56 +0000 +0000 | 2020-08-25 18:01:56 +0000 +0000 | null | null | null | null | 2020-08-25 16:21:56 +0000 +0000 | 2020-08-25 16:21:56 +0000 +0000 | 6000 |
// | 1 | PullRequest #1 | https://github.com/grafana/github-datasource/pulls/1 | 5 | 1 | grafana/github-datasource | OPEN | Test User | testUser | [email protected] | ACME corp | true | false | false | true | MERGEABLE | 2020-08-25 18:01:56 +0000 +0000 | 2020-08-25 18:01:56 +0000 +0000 | null | null | null | null | 2020-08-25 16:21:56 +0000 +0000 | 2020-08-25 16:21:56 +0000 +0000 | 6000 |
// | 2 | PullRequest #2 | https://github.com/grafana/github-datasource/pulls/2 | 0 | 0 | grafana/github-datasource | OPEN | Second User | testUser2 | [email protected] | ACME corp | true | false | false | true | MERGEABLE | 2020-08-25 18:01:56 +0000 +0000 | 2020-08-25 18:01:56 +0000 +0000 | Test User | testUser | [email protected] | ACME corp | 2020-08-25 18:21:56 +0000 +0000 | 2020-08-25 16:21:56 +0000 +0000 | 6000 |
// | 3 | PullRequest #2 | https://github.com/grafana/github-datasource/pulls/3 | 0 | 0 | grafana/github-datasource | OPEN | Second User | testUser2 | [email protected] | ACME corp | false | false | false | false | MERGEABLE | null | 2020-08-25 18:01:56 +0000 +0000 | null | null | null | null | 2020-08-25 18:21:56 +0000 +0000 | 2020-08-25 16:21:56 +0000 +0000 | 6000 |
// +---------------+----------------+------------------------------------------------------+-----------------+-----------------+---------------------------+----------------+-------------------+--------------------+--------------------+----------------------+--------------+----------------+--------------+--------------+-----------------+---------------------------------+---------------------------------+----------------------+-----------------------+-----------------------+-------------------------+---------------------------------+---------------------------------+-----------------+
Expand Down Expand Up @@ -226,12 +226,12 @@
"https://github.com/grafana/github-datasource/pulls/3"
],
[
0,
5,
0,
0
],
[
0,
1,
0,
0
],
Expand Down

0 comments on commit 9a9bf4b

Please sign in to comment.