mirror of https://github.com/statping/statping
				
				
				
			changelog, version up, tests
							parent
							
								
									ef60ba765c
								
							
						
					
					
						commit
						3d0e718ee1
					
				| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
# 0.90.51 (06-15-2020)
 | 
			
		||||
- Fix Theme Editor codemirror inputs to show on load
 | 
			
		||||
- Added favicon folder for local assets can be used without remote access
 | 
			
		||||
- Modified Notifier's to return the response as a string for the frontend
 | 
			
		||||
- Modified Notifiers so they can use custom data for their request
 | 
			
		||||
- Added Notifier OnSuccess and onFailure custom data on frontend
 | 
			
		||||
 | 
			
		||||
# 0.90.50 (06-13-2020)
 | 
			
		||||
- Removed PORT, replaced with SERVER_PORT
 | 
			
		||||
- Removed HOST/IP, replaced with SERVER_IP
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -250,7 +250,7 @@ func TestMainApiRoutes(t *testing.T) {
 | 
			
		|||
				`go_memstats_alloc_bytes`,
 | 
			
		||||
				`http_duration_seconds_count`,
 | 
			
		||||
				`http_response_bytes_count`,
 | 
			
		||||
				`service_request_duration_count`,
 | 
			
		||||
				`service_success`,
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,15 +2,17 @@ package notifiers
 | 
			
		|||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/magiconair/properties/assert"
 | 
			
		||||
	"github.com/statping/statping/types/failures"
 | 
			
		||||
	"github.com/statping/statping/types/services"
 | 
			
		||||
	"testing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestReplaceTemplate(t *testing.T) {
 | 
			
		||||
	temp := `{"id":{{.Service.Id}},"name":"{{.Service.Name}}"}`
 | 
			
		||||
	replaced := ReplaceTemplate(temp, replacer{Service: exampleService})
 | 
			
		||||
	assert.Equal(t, `{"id":1,"name":"Statping"}`, replaced)
 | 
			
		||||
	replaced := ReplaceTemplate(temp, replacer{Service: services.Example(true)})
 | 
			
		||||
	assert.Equal(t, `{"id":6283,"name":"Statping"}`, replaced)
 | 
			
		||||
 | 
			
		||||
	temp = `{"id":{{.Service.Id}},"name":"{{.Service.Name}}","failure":"{{.Failure.Issue}}"}`
 | 
			
		||||
	replaced = ReplaceTemplate(temp, replacer{Service: exampleService, Failure: exampleFailure})
 | 
			
		||||
	assert.Equal(t, `{"id":1,"name":"Statping","failure":"HTTP returned a 500 status code"}`, replaced)
 | 
			
		||||
	replaced = ReplaceTemplate(temp, replacer{Service: services.Example(false), Failure: failures.Example()})
 | 
			
		||||
	assert.Equal(t, `{"id":6283,"name":"Statping","failure":"HTTP returned a 500 status code"}`, replaced)
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
0.90.50
 | 
			
		||||
0.90.51
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue