• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber-go / dig / 310
93%
master: 87%

Build:
Build:
LAST BUILD BRANCH: ajs-vals
DEFAULT BRANCH: master
Ran 01 Jun 2017 07:16PM UTC
Jobs 2
Files 1
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
310

push

travis-ci

abhinav
[2/2] Fix end-to-end behavior tests (#72)


See #70 for context.

This PR follows up on the previous test-only diff. It removes all
pre-existing tests, fixes the integration tests, and finally removes all
features not required to make the end-to-end tests pass. Along the way,
it does some fairly significant refactoring.

Most importantly, it combines the internal graph package and the
top-level dig package into a single package. Since `Container` and
`Graph` are basically the same thing, this simplifies the code a fair
bit without expanding the exported API at all. More importantly, it lets
us *improve* overall code coverage with *just* the end-to-end tests:

```
$ go test -cover .
ok      go.uber.org/dig 0.010s  coverage: 91.1% of statements
```

This gives us the freedom to refactor and add features aggressively,
since we're only testing important user-facing APIs.

Features removed (at least for now):
- `Container.Resolve`: Fx doesn't need it and we don't want users
  interacting with dig directly, so it can go.
- `Container.Invoke`: now only runs the supplied function. It *doesn't*
  provide any dependencies. (We can always add that back if necessary,
  but I like the clean separation between providing deps and triggering
  side effects.)

Features added:
- Consistent support for scalars, structs, functions (with caveats noted
  in the tests), and channels.

All the end-to-end tests pass now.

153 of 167 relevant lines covered (91.62%)

42.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 310.1 01 Jun 2017 07:16PM UTC 0
91.62
Travis Job 310.1
2 310.2 01 Jun 2017 07:16PM UTC 0
91.62
Travis Job 310.2
Source Files on build 310
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #310
  • da048de2 on github
  • Prev Build on dev (#307)
  • Next Build on dev (#317)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc