gavinbunney / terraform-provider-bitbucketserver

Terraform provider for Bitbucket Server Management
https://registry.terraform.io/providers/gavinbunney/bitbucketserver/latest
Mozilla Public License 2.0
29 stars 33 forks source link

fix: Allow unmarshal json to tolerate null datetimes #27

Closed kcao-guidewire closed 3 years ago

kcao-guidewire commented 3 years ago

When we tried using bitbucketserver_license for one of our license keys, we discovered that while the license was applied successfully onto the server, the response json had several attributes set to null. In the body of the response, gracePeriodEndDate and expiryDate were both null.

We've added code to handle this case. Since we were not sure what to parse null time to, we just returned the zero value.

codecov-io commented 3 years ago

Codecov Report

Merging #27 (555f590) into master (35b8cd3) will decrease coverage by 0.07%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   84.37%   84.29%   -0.08%     
==========================================
  Files          37       37              
  Lines        3315     3318       +3     
==========================================
  Hits         2797     2797              
- Misses        301      303       +2     
- Partials      217      218       +1     
Impacted Files Coverage Δ
bitbucket/json_types.go 45.45% <0.00%> (-17.05%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 35b8cd3...555f590. Read the comment docs.

gavinbunney commented 3 years ago

Released in v1.5.0, now on the Terraform registry: https://registry.terraform.io/providers/gavinbunney/bitbucketserver/latest