// GetSitesMock is a mock of the SQL query to get the sites for pinging
func GetSitesMock(db *sql.DB) (database.Sites, error) {
	var sites database.Sites
	// Create the first site.
	s1 := database.Site{Name: "Test", IsActive: true, URL: "http://www.google.com",
		PingIntervalSeconds: 1, TimeoutSeconds: 1, IsSiteUp: true}
	// Create the second site.
	s2 := database.Site{Name: "Test 2", IsActive: true, URL: "http://www.github.com",
		PingIntervalSeconds: 2, TimeoutSeconds: 2, IsSiteUp: true}
	// Create the third site as not active.
	s3 := database.Site{Name: "Test 3", IsActive: false, URL: "http://www.test.com",
		PingIntervalSeconds: 2, TimeoutSeconds: 2}
	// Contacts are deliberately set as false for SmsActive and EmailActive so as not to trigger Notifier
	c1 := database.Contact{Name: "Joe Contact", EmailAddress: "*****@*****.**", SmsNumber: "5125551212",
		SmsActive: false, EmailActive: false}
	c2 := database.Contact{Name: "Jack Contact", EmailAddress: "*****@*****.**", SmsNumber: "5125551213",
		SmsActive: false, EmailActive: false}
	// Add the contacts to the sites
	s1.Contacts = append(s1.Contacts, c1, c2)
	s2.Contacts = append(s2.Contacts, c1)
	s3.Contacts = append(s3.Contacts, c1)

	sites = append(sites, s1, s2, s3)
	return sites, nil
}
// Create the struct for the Site and its contacts used for testing.
func getTestSite() database.Site {
	s1 := database.Site{Name: "Test", IsActive: true, URL: "http://www.google.com",
		PingIntervalSeconds: 2, TimeoutSeconds: 1}

	// Create first contact
	c1 := database.Contact{Name: "Joe Contact", EmailAddress: "*****@*****.**", SmsNumber: "5125551212",
		SmsActive: false, EmailActive: true}
	// Create second contact
	c2 := database.Contact{Name: "Jack Contact", EmailAddress: "*****@*****.**", SmsNumber: "5125551213",
		SmsActive: true, EmailActive: false}

	// Add the contacts to the sites
	s1.Contacts = append(s1.Contacts, c1, c2)

	return s1
}