Comments (6)
go test -v ./pkg/api/ works to run tests in a folder, but running from the main dir doesn't explore. There is another command you can run with go 1.9. I'm on 1.8, so will upgrade, test the command, change the makefile to use it, validate it's on 1.9, and I think that's a solution.
from hermes.
upgrading to 1.9 allows the go test -v ./pkg/api to work on the command line. All of the tests were being testing individually, now together there is an error
panic: duplicate metrics collector registration attempted [recovered]
Sorting out how to fix now.
from hermes.
The problem is how we're registering prometheus for each endpoint instead of the standard in init. This is to attach labels on the prometheus metrics instead of having an individual metric for each end point.
This is not a problem normally because you don't run register multiple times, but in the case of multiple tests it's registering.
I need to either set a mock flag to know if to register it or not, or to move the registering to a different place.... hrm... still thinking of ideas.
from hermes.
Another option is we can attach labels after the fact, so we could init the tests and registration, then in the function just attach the label for each handler.
from hermes.
Wrote a teardown function to unregister the collectors for Prom, but it doesn't allow you to reregistar with the same name (to not get screwy metrics).
So back to the drawing board.
from hermes.
Corrected this, now running all tests. Their passing is a different issue I'll continue. Closing this one.
from hermes.
Related Issues (20)
- Migrate to ES cluster and increase data retention HOT 1
- Gorilla Mux is archived and no longer maintained. HOT 1
- observer name inconsistent
- Rate Limiting for Hermes API
- Sort isn't working on all fields HOT 1
- Limit for attributes is applied before the max-depth filter HOT 4
- Add resource names into the event HOT 9
- Support OR and NOT conditions for the filter HOT 5
- Show project resources events made from the system scope HOT 2
- Date ranges via Dashboard no longer functional HOT 1
- Could not load attributes if no events HOT 1
- Hermes API crashes, when attributes are requested from an empty index
- Log user token details HOT 1
- Allow listing all events from a system (cloud admin) scope HOT 2
- Details to events API HOT 1
- Max Limit for ES Queries is limited to 10k. Can we increase? HOT 2
- Dependency Dashboard
- Document Client sending Audit Events HOT 1
- Add search over entire event HOT 2
- Replace Depricated olivere's golang es client HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermes.