testcontainers / testcontainers/testcontainers-java

Parsing of scripts containing the syllables "end" or "begin" is broken

Open
#1,235 7 comments 1 reaction 1 assignee View on GitHub

@rnorth is already working on this.

Since Apr 17, 2019.

modules/jdbc resolution/acknowledged type/bug
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

A script containing the syllable "end" (or, I suppose "begin") outside a comment or a quote will prevent the code from finding any further line-breaks, thus, usually breaking the script.
the offending line is https://github.com/testcontainers/testcontainers-java/blob/b6de1ac6de2bc1a68c5a789661f48341f8cb858c/modules/database-commons/src/main/java/org/testcontainers/ext/ScriptUtils.java#L168

An example script would be

create tablespace DEV datafile 'dev.dbf' size 256M autoextend on;
CREATE USER bla IDENTIFIED BY testuser DEFAULT TABLESPACE DEV;
CREATE USER blub IDENTIFIED BY testuser DEFAULT TABLESPACE DEV;
CREATE USER bloh IDENTIFIED BY testuser DEFAULT TABLESPACE DEV;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.