-
Notifications
You must be signed in to change notification settings - Fork 17
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
AG-22 - Add Agent Tests #58
base: master
Are you sure you want to change the base?
Commits on Sep 22, 2023
-
Add tests for NewHeartbeat and Update functions ``` This commit adds tests for the `NewHeartbeat` and `Update` functions in the `agent` package. The `NewHeartbeat` test checks if the `NewHeartbeat` function correctly initializes a new heartbeat with the given name, service type, and interval. It also verifies the initial status and info of the heartbeat. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e427739 - Browse repository at this point
Copy the full SHA e427739View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1760a96 - Browse repository at this point
Copy the full SHA 1760a96View commit details -
Fix error when writing to TOML file The commit fixes an error that occurs when writing to a TOML file. The error is wrapped with a custom error message. This ensures that the error is properly handled and provides more context to the developer. The commit also includes changes to the import statements in the bootstrap.go file. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 98d44f3 - Browse repository at this point
Copy the full SHA 98d44f3View commit details -
Fix error handling in bootstrap_test.go
The commit fixes error handling in the bootstrap_test.go file by checking for an error when writing the response body. This ensures that any errors are properly handled and reported. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2c00958 - Browse repository at this point
Copy the full SHA 2c00958View commit details -
Fix context bug in NewHeartbeat function to allow graceful stop to li…
…sten function Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d6c94d4 - Browse repository at this point
Copy the full SHA d6c94d4View commit details -
Fix race condition in Heartbeat.Info() method
The `Info()` method in the `Heartbeat` interface was not thread-safe, which could lead to a race condition when accessing the `info` field. To fix this issue, a mutex was added to protect the access to `info` and ensure thread safety. The `Info()` method now locks the mutex before accessing `info` and unlocks it before returning the value. Additionally, a new `Close()` method was added to stop the heartbeat ticker when it is no longer needed. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5173159 - Browse repository at this point
Copy the full SHA 5173159View commit details -
Fix error handling in agent/config.go
The commit fixes error handling in agent/config.go by adding more specific error variables and updating the error messages. This improves the clarity and readability of the codebase. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 54eb0c4 - Browse repository at this point
Copy the full SHA 54eb0c4View commit details
Commits on Sep 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bc62713 - Browse repository at this point
Copy the full SHA bc62713View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37454e2 - Browse repository at this point
Copy the full SHA 37454e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e128d3 - Browse repository at this point
Copy the full SHA 3e128d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 389cf39 - Browse repository at this point
Copy the full SHA 389cf39View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb91759 - Browse repository at this point
Copy the full SHA cb91759View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9319d04 - Browse repository at this point
Copy the full SHA 9319d04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ed7430 - Browse repository at this point
Copy the full SHA 8ed7430View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23fca33 - Browse repository at this point
Copy the full SHA 23fca33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3577f0e - Browse repository at this point
Copy the full SHA 3577f0eView commit details
Commits on Sep 28, 2023
-
Refactor build workflow The build22.yml file has been deleted. This commit removes the build22.yml file, which was used to create and publish a Docker image. The file is no longer needed as it is no longer being used in the project. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37ccb04 - Browse repository at this point
Copy the full SHA 37ccb04View commit details -
Add test for PushOperation function in edgex package
This commit adds a new test for the PushOperation function in the edgex package. The test creates a mock HTTP server and checks the HTTP request method, URL, and request body. The test ensures that the function correctly handles the POST request with the expected URL and request body. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2dc7996 - Browse repository at this point
Copy the full SHA 2dc7996View commit details -
Add tests for the conn package
This commit adds tests for the conn package. The tests cover various scenarios and ensure the functionality of the package is working as expected. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 400dbb1 - Browse repository at this point
Copy the full SHA 400dbb1View commit details -
The commit fixes a bug in the client_test.go file where the expected response was not being properly set. The bug caused the test to fail. The fix ensures that the expected response is correctly set and the test passes as expected. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4a4b4ec - Browse repository at this point
Copy the full SHA 4a4b4ecView commit details -
Fix error handling in main.go and endpoints_test.go
The commit fixes error handling in main.go and endpoints_test.go. It ensures that the server is properly shutdown and logs any errors that occur during the shutdown process. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 09b6fc1 - Browse repository at this point
Copy the full SHA 09b6fc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 397d40e - Browse repository at this point
Copy the full SHA 397d40eView commit details -
Fix Docker image tag and file path in Makefile and Dockerfile
The Docker image tag and file path in the Makefile and Dockerfile have been fixed to use the correct repository name "Mainflux" instead of "sammyoina". This ensures that the Docker images are tagged and pushed to the correct repository. Additionally, the file path in the Dockerfile has been updated to correctly move the built executable to the desired location. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e667a83 - Browse repository at this point
Copy the full SHA e667a83View commit details -
Configuration menu - View commit details
-
Copy full SHA for dcee54f - Browse repository at this point
Copy the full SHA dcee54fView commit details -
Fix Docker image tag in Makefile
The Docker image tag in the Makefile was updated to use lowercase "mainflux" instead of "Mainflux". This ensures consistency with the naming convention used for the Docker images. Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3cd4521 - Browse repository at this point
Copy the full SHA 3cd4521View commit details
Commits on Oct 18, 2023
-
add test cases and format string
Signed-off-by: SammyOina <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for acc18bb - Browse repository at this point
Copy the full SHA acc18bbView commit details