diff options
| author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2026-02-12 15:18:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-12 15:18:32 -0500 |
| commit | d6b60205974136969212a2e415dadd773b471bc0 (patch) | |
| tree | 4889f9b9b2767456d0375dd5a262259ad732f8c6 /tests | |
| parent | 7ae2f824eb52b4294465a1430836ecce73419c02 (diff) | |
| parent | 2cd2d2c47593941f002ed45f44f0e0c1072738d7 (diff) | |
| download | stasis-d6b60205974136969212a2e415dadd773b471bc0.tar.gz | |
Merge pull request #125 from jhunkeler/retry-download
Add a retry loop to download()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_download.c | 1 | ||||
| -rw-r--r-- | tests/test_strlist.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_download.c b/tests/test_download.c index 714e614..31e9792 100644 --- a/tests/test_download.c +++ b/tests/test_download.c @@ -33,7 +33,6 @@ void test_download() { } STASIS_ASSERT(http_code == tc[i].http_code, "expecting non-error HTTP code"); - //char **data = file_readlines(filename, 0, 100, NULL); char *data = stasis_testing_read_ascii(filename); if (http_code >= 0) { STASIS_ASSERT(data != NULL, "data should not be null"); diff --git a/tests/test_strlist.c b/tests/test_strlist.c index ce38ff6..47722c0 100644 --- a/tests/test_strlist.c +++ b/tests/test_strlist.c @@ -115,6 +115,7 @@ void test_strlist_append_file() { const char *local_filename = "test_strlist_append_file.txt"; struct testcase tc[] = { + {.origin = "https://this-will-never-work.tld/remote.txt", .expected = (const char *[]){NULL}}, {.origin = "https://ssb.stsci.edu/jhunk/stasis_test/test_strlist_append_file_from_remote.txt", .expected = expected}, {.origin = local_filename, .expected = expected}, }; @@ -141,10 +142,10 @@ void test_strlist_append_file() { const char *left; const char *right; left = strlist_item(list, z); - right = expected[z]; + right = tc[i].expected[z]; STASIS_ASSERT(strcmp(left, right) == 0, "file content is different than expected"); } - STASIS_ASSERT(strcmp_array((const char **) list->data, expected) == 0, "file contents does not match expected values"); + STASIS_ASSERT(strcmp_array((const char **) list->data, tc[i].expected) == 0, "file contents does not match expected values"); guard_strlist_free(&list); } } |
