Skip to content

Latest commit

 

History

History
94 lines (61 loc) · 2.46 KB

File metadata and controls

94 lines (61 loc) · 2.46 KB

Integration Tests

Prerequisites

  • Docker
  • Docker Compose
  • Go 1.23.2 (or higher)
  • You have followed the instructions to set up the .env file in the main README

Install dependencies

Open a terminal in the integration-tests/lca directory.

Install dependencies:

go mod tidy

Do the same in the integration-tests/ifc directory.

Add an IFC File to the Test

  1. Create a new directory called assets in the integration-tests directory.
  2. Add an IFC file to the assets directory.
  3. Rename the file to test.ifc.

Running the Tests

Open a new terminal window in the integration-tests directory:

cd integration-tests

Start the services

Run the following command to start the services:

docker compose up --build -d

Open the MinIO Console

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.

Add Content to the IFC Kafka Topic

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:

  1. Refresh the Object Browser in the MinIO console.
  2. You should see new buckets called ifc-files and ifc-fragment-files.
  3. Open the buckets. If no folders show up, try refreshing the bucket.
  4. Open the folders and check that the files are present.

Add content to the LCA and Cost Kafka topic

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:

  1. Refresh the Object Browser in the MinIO console.
  2. You should see a bucket called lca-cost-data.
  3. Open the bucket. If no folders show up, try refreshing the bucket.
  4. Open the folders and check that the files are present.

Verify the viz_pbi-server is Working

Check the output of the test.ts in the terminal. It should say: "Pass: Fragments file is a Buffer".