I'm trying to configure integration tests to run l...
# replication-ask-ai
e
I'm trying to configure integration tests to run locally for development. I've setup all the proper YAML files and my Dockerfile, but the integration tests (dagger) do not use the Docker image i am building locally, and instead try to pull from docker hub. How can i test changes without having to push an image to a remote source? Here is the error:
Copy code
dagger.exceptions.QueryError: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
k
To run integration tests locally using your local Docker image, you need to build your connector image and tag it appropriately. Here are the steps you can follow: 1. Build your connector image:
Copy code
bash docker build .
2. Then, build the connector image with a specific tag. For example:
Copy code
bash docker build ./airbyte-integrations/connectors/<connector-name> -t airbyte/<connector-name>:dev
The above connector image is tagged with
dev
. You can change this to use another tag if you'd like. Now, when you run your integration tests, they should use your local Docker image instead of trying to pull from Docker Hub. If you're still facing issues, it might be helpful to check your
acceptance-test-config.yml
file. This file should be in the root folder of your connector and should be configured correctly. Here is an example of the minimal `acceptance-test-config.yml`:
Copy code
yaml connector_image: airbyte/source-some-connector:dev   acceptance-tests:    spec:    tests:    - spec_path: "some_folder/spec.yaml"
Please replace
source-some-connector:dev
with your connector's name and tag. For more information, you can refer to the [Airbyte documentation on testing connectors](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) and [developing locally](https://docs.airbyte.com/contributing-to-airbyte/resources/developing-locally).
e
My
acceptance-test-config.yaml
file lists
connector_image: local_test
, and i am manually building my image with
docker build . -t local_test
, but still get the dagger error.
@kapa.ai It seems like i have to tag my image, no matter the name, with
dev
. Any other tag triggers the error.
k
New message text here
e
@kapa.ai So then it is not configurable? Or in other words, my development image must be tagged
dev
and my production image tagged
latest
?
k
A message from kapa.ai
New message text here
e
@kapa.ai I also run into an issue with the
TestSpec.test_backward_compatibility
test as it tries to pull from the
latest
tag. Since nothing has been released yet, there is no image online to pull from. Manually tagging my local image as
latest
also does not work. The test still returns the same dagger error.
k
A message from kapa.ai
New message text here