Skip to content

Commit

Permalink
Merge branch 'master' into segment-type
Browse files Browse the repository at this point in the history
* master:
  mod tidy
  Update Changlog and targeting spec
  Bump github.com/mattn/go-sqlite3 from 1.12.0 to 1.13.0 (#191)
  Edit GH templates
  • Loading branch information
markphelps committed Nov 26, 2019
2 parents 1ef5890 + df73704 commit 915c369
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: markphelps

---

**Describe the bug**
Expand All @@ -26,6 +24,7 @@ If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.

Examples:

* OS
* Config file used
* Database used (SQLite or Postgres)
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: markphelps

---

**Is your feature request related to a problem? Please describe.**
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.10.5](https:/markphelps/flipt/releases/tag/v0.10.5) - 2019-11-25

### Added

* Evaluation benchmarks: [https:/markphelps/flipt/pull/185](https:/markphelps/flipt/pull/185)

### Changed

* Update UI dependencies: [https:/markphelps/flipt/pull/183](https:/markphelps/flipt/pull/183)
* Update go-sqlite3 version

### Fixed

* Calculate distribution percentages so they always add up to 100% in UI: [https:/markphelps/flipt/pull/189](https:/markphelps/flipt/pull/189)

## [v0.10.4](https:/markphelps/flipt/releases/tag/v0.10.4) - 2019-11-19

### Added
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/hashicorp/golang-lru v0.5.3
github.com/lib/pq v1.2.0
github.com/markphelps/flipt-grpc-go v0.0.0-20190303144529-3ebb133e62c0
github.com/mattn/go-sqlite3 v1.12.0
github.com/mattn/go-sqlite3 v1.13.0
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029
github.com/prometheus/client_golang v1.2.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaa
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-sqlite3 v1.12.0 h1:u/x3mp++qUxvYfulZ4HKOvVO0JWhk7HtE8lWhbGz/Do=
github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.13.0 h1:LnJI81JidiW9r7pS/hXe6cFeO5EXNq7KbfvoJLRI69c=
github.com/mattn/go-sqlite3 v1.13.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
Expand Down
12 changes: 10 additions & 2 deletions ui/__tests__/targeting.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ test("validRollout returns true if rollouts sum to equal to 100", () => {

const computePercentages = targeting.methods.computePercentages;

test("computePercentages returns an array of percentages evenly distributed for factors of 100", () => {
test("computePercentages returns an array of 1 percentage for n = 1", () => {
let n = 1
let expected = [100.00]
let got = computePercentages(n)

expect(got).toStrictEqual(expected)
});

test("computePercentages returns an array of percentages evenly distributed if 100 % n = 0", () => {
let n = 5
let expected = [20.00, 20.00, 20.00, 20.00, 20.00]
let got = computePercentages(n)
Expand All @@ -47,7 +55,7 @@ test("computePercentages returns an array of percentages evenly distributed for
expect(sum.toFixed(2)).toBe("100.00")
});

test("computePercentages returns any array of percentages that add up to 100 for non-factors", () => {
test("computePercentages returns any array of percentages that add up to 100 if 100 % n != 0", () => {
let n = 3
let expected = [33.34, 33.33, 33.33]
let got = computePercentages(n)
Expand Down

0 comments on commit 915c369

Please sign in to comment.