Skip to content
Snippets Groups Projects
Commit ea936eaa authored by William Walker's avatar William Walker
Browse files

fix: add new user_status field added by 2025.2.0

--Add new user_status field to User model (new platform API release from vendor)
--Add test to generate report listing all test student users with no email
parent d5b0aa97
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,9 @@ import kotlinx.serialization.Serializable
public data class User(
@SerialName("login_id")
val loginId: String = "",
@SerialName("user_status")
val userStatus: String = "",
@SerialName("email_address")
val emailAddress: String = "",
......
......@@ -19,11 +19,14 @@
package edu.ucsc.its.temerity.test
import edu.ucsc.its.temerity.util.currentDate
import io.kotest.common.ExperimentalKotest
import io.kotest.common.KotestInternal
import io.kotest.engine.runBlocking
import kotlin.time.Duration.Companion.hours
import kotlin.time.Duration.Companion.minutes
import org.jetbrains.kotlinx.dataframe.api.toDataFrame
import org.jetbrains.kotlinx.dataframe.io.writeCSV
private class ProdUtilityTests : TemProdFunSpec() {
......@@ -48,5 +51,17 @@ private class ProdUtilityTests : TemProdFunSpec() {
kermit.d("Deleted $deletedUsers test student users.")
}
}
}
test("Generate a report listing all Canvas Test Student users").config(blockingTest = true, timeout = 12.hours) {
runBlocking {
val testStudentList = testTemerity.getUsers().filter {
it.firstName.startsWith("test", ignoreCase = true) &&
it.lastName.startsWith("student", ignoreCase = true) &&
it.emailAddress.isEmpty()
}
kermit.d("Found ${testStudentList.size} test student users.")
testStudentList.toDataFrame().writeCSV("test-student-users-${currentDate()}.csv")
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment