Discourse seed data for discourse_api tests

(Blake Erickson) #1

I’m not able to get the all the discourse_api tests to pass. I think it has to do with my discourse database data. It looks like the tests reference the user ‘test_user’ and sometimes ‘test-user’, but those aren’t in the discourse development database. And the tests don’t generate seed data for discourse with the usernames it needs to run.

I feel like the discourse_api tests should just work out of the box with discourse running in development mode.

Just wanted to make sure other people are able to run the tests or if I’m doing something wrong?

(Sam Saffron) #2

Yes this is idea, but we are going to need some seed data.

Perhaps work on a task like, which we are expected to run on the api project before tests work.

rake seed:test_data

Either that, or the integration tests can expect an admin api key and use the api to populate what they need.

(Blake Erickson) #3

Yep, understood. Now that I know I’m not doing something wrong I’ll get working on some seed data. :stuck_out_tongue_winking_eye:

(Blake Erickson) #4

I created some seed data for the discourse_api so that the tests would pass: