Skip to content

Commit bef9db4

Browse files
author
Jan Waś
committed
Adjust tests to GH API behavior changes
1 parent ce2bc6e commit bef9db4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

trino-rest-github/src/main/java/pl/net/was/rest/github/GithubRest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ private Iterable<List<?>> getIssues(RestTableHandle table)
18111811
String repo = (String) filter.getFilter((RestColumnHandle) columns.get("repo"), constraint);
18121812
requirePredicate(owner, "issues.owner");
18131813
requirePredicate(repo, "issues.repo");
1814-
String since = (String) filter.getFilter((RestColumnHandle) columns.get("updated_at"), constraint, "1970-01-01T00:00:00Z");
1814+
String since = (String) filter.getFilter((RestColumnHandle) columns.get("updated_at"), constraint, "1970-01-01");
18151815
String state = (String) filter.getFilter((RestColumnHandle) columns.get("state"), constraint, "all");
18161816
SortItem sortOrder = getSortItem(table);
18171817
return getRowsFromPages(

trino-rest-github/src/test/java/pl/net/was/rest/github/TestGithubQueries.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,11 @@ public void selectFromGithubActionsTable()
8686
assertThat(runId).isGreaterThan(0);
8787
long jobId = (long) runner.execute(format("SELECT id FROM jobs WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND run_id = %d LIMIT 1", runId)).getOnlyValue();
8888
assertThat(jobId).isGreaterThan(0);
89-
// TODO this is unreliable, as old job logs can get pruned by Github
89+
// TODO this is unreliable, as old job logs and steps can get pruned by Github
9090
//long logLength = (long) runner.execute(format("SELECT length(contents) FROM job_logs WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND job_id = %d", jobId)).getOnlyValue();
9191
//assertThat(logLength).isGreaterThan(0);
92-
93-
assertQuery(format("SELECT owner FROM steps WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND run_id = %d LIMIT 1", runId),
94-
"VALUES ('nineinchnick')");
92+
//assertQuery(format("SELECT owner FROM steps WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND run_id = %d LIMIT 1", runId),
93+
// "VALUES ('nineinchnick')");
9594
// can't check results, since currently no jobs produce artifacts
9695
assertQuerySucceeds(format("SELECT owner FROM artifacts WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND run_id = %d", runId));
9796
// TODO this doesn't work with the default token available in GHA

0 commit comments

Comments
 (0)