Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests generated for gentests/books/books_test.go do not pass #145

Open
tsmith-rv opened this issue Mar 31, 2022 · 0 comments
Open

Tests generated for gentests/books/books_test.go do not pass #145

tsmith-rv opened this issue Mar 31, 2022 · 0 comments

Comments

@tsmith-rv
Copy link

When pulling the latest code (d9421b2), the tests for books pass until you actually generate new tests using gentests/gentest.go, at which point the tests fail. The response looks like:

=== RUN   TestBooks
    books_test.go:48: got 
        <Document>
          <books xmlns="urn:books">
            <book name="bk001" xmlns="urn:books" xmlns:_="urn:books">
              <author xmlns="urn:books">Writer</author>
              <genre xmlns="urn:books">Fiction</genre>
              <price xmlns="urn:books">44.95</price>
              <pub_date xmlns="urn:books">2000-10-01Z</pub_date>
              <review xmlns="urn:books">An amazing story of nothing.</review>
              <title xmlns="urn:books">The First Book</title>
            </book>
            <book name="bk002" xmlns="urn:books" xmlns:_="urn:books">
              <author xmlns="urn:books">Poet</author>
              <title xmlns="urn:books">The Poets First Poem</title>
              <genre xmlns="urn:books">Poem</genre>
              <price xmlns="urn:books">24.95</price>
              <review xmlns="urn:books">Least poetic poems.</review>
              <pub_date xmlns="urn:books">2003-12-01Z</pub_date>
            </book>
          </books>
        </Document>
        
        , wanted 
        <Document>
          <books xmlns="urn:books" xmlns:books="urn:books">
            <book name="bk001">
              <author>Writer</author>
              <genre>Fiction</genre>
              <price>44.95</price>
              <pub_date>2000-10-01</pub_date>
              <review>An amazing story of nothing.</review>
              <title>The First Book</title>
            </book>
            <book name="bk002">
              <author>Poet</author>
              <title>The Poets First Poem</title>
              <genre>Poem</genre>
              <price>24.95</price>
              <review>Least poetic poems.</review>
              <pub_date>2003-12-01</pub_date>
            </book>
          </books>
        </Document>
        
--- FAIL: TestBooks (0.00s)

FAIL

Process finished with the exit code 1

Going back through previous commits it seems that 0649c2c is where the tests in books start to fail like this when generating the tests.

@tsmith-rv tsmith-rv changed the title Tests Created by gentest.go No Longer Pass Tests generated for gentests/books/books_test.go do not pass Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant