Skip to content

Commit

Permalink
reactivate pdf test
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerr committed Aug 13, 2024
1 parent d65721a commit 52c5af7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 10 additions & 0 deletions Releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Creating a release

We currently don't deploy this to maven central (though that'd be nice), so we just create a release on GitHub.
Steps:

- Run workflow "Set Version" to set non-snapshot version
- Run workflow "Build and Deploy Github Package"
- Run workflow "Build and Deploy to Docker Hub"
- Set master branch to the new version tag
- Run workflow "Set Version" to set snapshot version
10 changes: 3 additions & 7 deletions src/test/java/net/stoerr/chatgpt/codevengine/UrlActionIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static org.hamcrest.CoreMatchers.is;

import org.hamcrest.CoreMatchers;
import org.junit.Ignore;
import org.junit.Test;

public class UrlActionIT extends AbstractActionIT {
Expand Down Expand Up @@ -45,15 +44,12 @@ public void testUrlWithoutProtocol() throws Exception {
}

@Test
@Ignore("The URL doesn't work anymore.")
// FIXME(hps,24/08/13) use the test.pdf checked in
public void testPdfUrl() throws Exception {
TbUtils.logInfo("\nUrlActionIT.testPdfUrl");
String pdfUrl = "https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf";
String pdfUrl = "https://codevelopergptengine.stoerr.net/test/test.pdf";
String response = checkResponse("/fetchUrlTextContent?url=" + pdfUrl, "GET", null, 200, null);
collector.checkThat(response, CoreMatchers.containsString("markdown for text/html content of "));
collector.checkThat(response, CoreMatchers.containsString("INTERNET PROTOCOL"));
collector.checkThat(response, CoreMatchers.containsString("September 1981"));
collector.checkThat(response, CoreMatchers.containsString("text content of application/pdf content of "));
collector.checkThat(response, CoreMatchers.containsString("This is a test PDF"));
}

@Test
Expand Down

0 comments on commit 52c5af7

Please sign in to comment.