- Docker
- Docker Compose
- Go 1.23.2 (or higher)
- You have followed the instructions to set up the .env file in the main README
Open a terminal in the integration-tests/lca
directory.
Install dependencies:
go mod tidy
Do the same in the integration-tests/ifc
directory.
- Create a new directory called
assets
in theintegration-tests
directory. - Add an IFC file to the
assets
directory. - Rename the file to
test.ifc
.
Open a new terminal window in the integration-tests
directory:
cd integration-tests
Run the following command to start the services:
docker compose up --build -d
In your browser, go to localhost:9001
to see the MinIO console.
- Login using the credentials you specified in the .env ( main README )
- Delete all items in the
ifc-files
bucket. - Delete the
ifc-files
bucket. - Delete all items in the
ifc-fragment-files
bucket. - Delete the
ifc-fragment-files
bucket. - Delete all items in the
lca-cost-data
bucket. - Delete the
lca-cost-data
bucket.
Open a terminal in the integration-tests/ifc
directory and run:
go run main.go
Watch the output of the terminal. It should tell you that the test was passed. This takes up to a minute.
Verify the content was added correctly:
Verify that the bucket was created and that the content was added correctly:
- Refresh the Object Browser in the MinIO console.
- You should see new buckets called
ifc-files
andifc-fragment-files
. - Open the buckets. If no folders show up, try refreshing the bucket.
- Open the folders and check that the files are present.
Open a terminal in the integration-tests/lca_cost
directory and run:
go run main.go
Verify the content was added correctly:
Verify that the bucket was created and that the content was added correctly:
- Refresh the Object Browser in the MinIO console.
- You should see a bucket called
lca-cost-data
. - Open the bucket. If no folders show up, try refreshing the bucket.
- Open the folders and check that the files are present.
Check the output of the test.ts in the terminal. It should say: "Pass: Fragments file is a Buffer".